Splitter

Resizable layout with arbitrary regions, two directions, and recursive nesting.

Splitter

Supports any number of regions, two directions, and recursive nesting.

Regions and nesting

Nest more items inside the matching SplitterItem.

Rest and precision

use-rest keeps the remaining space; precision snaps to 0.01 by default.

Gap

A single value controls both directions. Arrays use [rowGap, columnGap]; 0 consumes no space and remains draggable.

Data model

type SplitterSize = number | 'rest'

interface SplitterGroupValue {
  type: 'horizontal' | 'vertical'
  size: Array<SplitterSize | SplitterGroupValue>
  value?: SplitterSize
}

Mismatched item counts are evenly recalculated. Object entries represent nested groups.

SplitterItem

PropTypeDefaultDescription
minnumberinherited min-sizeMinimum ratio for this region
maxnumber1Maximum ratio for this region
disabledbooleanfalseDisable the separator after this region
use-restbooleanfalsePermanently consume this level’s remainder; only one per level

Supports pointer, touch, arrow, Home, and End keys.

Splitter does not clip item content. Add overflow: auto to an inner container when scrolling is needed.

API

PROPS

Property
Type
Values
Description
default
Example
More
v-model
recursive layout tree
Direction and size tree for the complete split layout.
{ type: 'horizontal', size: ['rest', 'rest'] }
—
min-size
Number
0 - 1
Default minimum ratio for every region.
0.08
—
keyboard-step
Number
0 - 1
Arrow-key ratio step; follows precision when omitted.
precision step
—
precision
Number
0 - 8
Decimal precision used to snap every resize.
2
—
gap
Number | String | [, ]
single / [rowGapcolumnGap]
Row and column layout space occupied by separator buttons.
12
—
disabled
Boolean
true / false
Disable resizing for the complete layout.
false
—

EVENTS

Event
Type
Description
default
Example
More
update:modelValue
—
Emits the complete updated layout tree while resizing.
—
—
change
—
Emits the complete layout tree when resizing finishes.
—
—

SLOTS

Slot
Description
default
Example
More
default
Any number of recursively nested SplitterItem components.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied