Layout
Splitter
Panels with a gutter between each pair that resizes them, by dragging or from the keyboard, within each panel's minimum.
WAI-ARIA tested
Import
main.ts
import { Splitter } from '@vitral/vue';Horizontal
Three panels, each with min-size 10. The panels show their own size, from the resize event.
25%
50%
25%
Vertical
layout="vertical" stacks the panels; the arrow keys are Up and Down.
top
bottom (min-size 20)
Nested
A splitter inside a panel fills it: an explorer beside an editor over a terminal.
explorer
editor
terminal
API
Read from packages/vue/src/components/Splitter/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| layout | 'horizontal' | 'vertical' | `horizontal` (the default) puts panels side by side; `vertical` stacks them and needs a height. |
| gutterSize | number | Gutter thickness in pixels. Defaults to the `splitter.gutter.size` token. |
| step | number | Percentage points an arrow key moves a gutter. |
| as | string | Component | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| resizestart | event: SplitterResizeEvent | — |
| resize | event: SplitterResizeEvent | — |
| resizeend | event: SplitterResizeEvent | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | `SplitterPanel`s; anything else is left out. |