Splitter beta

Divide the area horizontally or vertically, and freely drag to adjust the size of each area.

Basic usage

The most basic usage, if no default size is passed, it will be automatically divided equally.

1
2

Vertical

Use vertical orientation.

1
2

Collapsible

Configuring collapsible provides quick shrinking capability. You can use the min property to prevent expanding through dragging after collapsing.

1
2
3
4
5

Disable drag

When either panel disables resizable, dragging will be disabled.

1
drag disable
3

Panel size

v-model:size can get the panel size.

1
100px
3

Splitter API

Splitter Attributes

NameDescriptionTypeDefault
layoutLayout direction of the splitterenumhorizontal

Splitter Events

NameDescriptiontype
resize-startTriggered when starting to resize a panel, index is the drag bar indexFunction
resizeTriggered while resizing a panel, index is the drag bar indexFunction
resize-endTriggered when panel resizing ends, index is the drag bar indexFunction

SplitterPanel API

SplitterPanel Attributes

NameDescriptionTypeDefault
size / v-model:sizeSize of the panel (in pixels or percentage)string / number-
minMinimum size of the panel (in pixels or percentage)string / number-
maxMaximum size of the panel (in pixels or percentage)string / number-
resizableWhether the panel can be resizedbooleantrue
collapsibleWhether the panel can be collapsedbooleanfalse

SplitterPanel Events

NameDescriptiontype
update:sizeTriggered when panel size changesFunction

SplitterPanel Slots

NameDescription
defaultDefault content of the panel
start-collapsibleCustom content for the start collapsible button
end-collapsibleCustom content for the end collapsible button

Source

ComponentStyleDocs

Contributors