Divides a layout into resizable panels with a draggable divider.
Panels are stacked when layout is set to vertical.
Initial dimensions are percentage based and provided through sizes on Splitter. Per-panel constraints are configured with minSize and maxSize.
Each panel can declare a minSize and a maxSize in percentages. The splitter ensures the panel cannot shrink below minSize nor grow beyond maxSize during a resize.
Adding collapsible to a panel allows it to snap to collapsedSize (default 0%) once it is dragged past the halfway point between collapsedSize and minSize. Keyboard resize collapses immediately when the panel reaches minSize.
Splitters can be nested by placing another Splitter inside a SplitterPanel.
Splitter emits resizestart, resize, and resizeend while a gutter is being dragged, and collapse whenever a collapsible panel snaps to or out of collapsedSize. Every event carries the current sizes.
Binding the panel sizes with v-model:sizes turns the Splitter into a controlled component. Persisting the bound state to localStorage keeps the layout across page reloads. The built-in stateKey/stateStorage pair offers the same persistence without manual bookkeeping.
When disabled is present on the splitter, every gutter becomes non-interactive. The splitter is rendered with data-disabled, which the theme uses to fade the gutter and turn off pointer interactions.
The default appearance is fully overridable through Tailwind utilities on the panels and the pt API on the gutter. Below, panels become colored badge containers and the gutter is rendered as a thin rounded bar.
A real-world layout combining a collapsible navigation pane, a custom gutter handle and a viewport that adapts to the current sizes. The pane switches to a compact list once its width drops below 28%.
Hi team, I've attached the Q1 marketing report. Please review the campaign metrics and share your feedback before our meeting on Friday.
Splitter gutter defines separator as the role with aria-orientation set to either horizontal or vertical. Each gutter provides aria-valuenow, aria-valuemin, and aria-valuemax to communicate panel sizes. Adjacent panels are linked via aria-controls.
| Key | Function |
|---|---|
| tab | Moves focus through the splitter bar. |
| down arrow | Moves a vertical splitter down. |
| up arrow | Moves a vertical splitter up. |
| left arrow | Moves a horizontal splitter to the left. |
| right arrow | Moves a horizontal splitter to the right. |