Live demo
Demo source
Use a split (the "Splitter" in the design) when people need to decide how much space each area gets, such as a list beside its details or a map above its data. Keep the default layout useful, because many people never move the divider.
Anatomy
Two stacked panels with four callouts: 1 marks Panel A, 2 the divider, 3 the handle in the middle of the divider, and 4 Panel B.
- Panel A is the first element with
slot="pane". - Divider sits between each pair of panes, and dragging it resizes them.
- Handle marks where to grab the divider. It is always shown.
- Panel B is the second element with
slot="pane". A split can hold more than two panes.
Direction
| Layout | Figma direction | Code direction |
|---|---|---|
| Side-by-side panes | vertical | horizontal |
| Stacked panes | horizontal | vertical |
Sizes
horizontal is the code default. sizes sets each pane in percent and
changes as people drag; minSizes (in pixels) stops a pane from shrinking too
far. Set minimum sizes deliberately: the component does not infer them from
the content.
Give the split a height, and put padding inside each pane rather than on it.
Handle, states and themes
The design has a Show Handle option; the implemented handle is always visible
and there is no corresponding boolean property. The gutter slot can add
custom handle content. gutterSize controls the draggable area, which defaults
to 24 px. The divider has resting, hover and active appearances using the
current theme's tokens.
Usage and accessibility
Use a split when both neighbouring areas matter and different tasks need different proportions, for example in editors or data exploration. Prefer a fixed layout when resizing adds little value, or a drawer/collapsible panel when the secondary area is rarely needed.
The divider only responds to a mouse; it can't be focused or moved with the
keyboard. Offer buttons that set sizes when the layout matters.