Components · Data Display · Splitter
Back to Splitter typesSplitter Experimental
Use for a resizable two-panel layout with a draggable divider between them, like a resizable sidebar next to a main content area - one Splitter component, controlled by properties, not a one-off resize handle wired up per screen.
Properties
Panel labels and split ratio are properties of the same component, not separate layouts - change them below to check both types and every state in the Live Preview.
Live Preview
Both types compared side by side, each in 3 states - Default (static split at the chosen ratio), Dragging (the divider highlighted mid-resize) and Collapsed (the first panel collapsed to a thin strip). One preview is rendered at the chosen panel labels and ratio.
Try it
The matrix shows Dragging as a still frame so it can sit beside the other states. This one is live: drag or use arrow keys to resize. Enter collapses/restores the first pane; Home/End use its bounds. Both expanded panes keep at least 64px when space permits. The chosen ratio is saved on this device; reset removes it.
When to use
Any layout where two adjacent panels should share space, and the user benefits from adjusting exactly how much each one gets.
Component Guide
Overview
Splitter is a resizable two-panel layout with a draggable divider between them - the user drags the divider to redistribute space between the two panels, and either panel can optionally collapse to a thin strip to temporarily reclaim its space.
When to Use
- A resizable sidebar next to a main content area - a file tree, a navigation panel, or a filters panel.
- A code editor and its live preview pane - both panels visible, resizable to taste.
- A master/detail layout - a list panel and a detail panel, like a chat list next to a conversation pane.
When Not to Use
- A fixed layout where resizing adds no value - don't add a Splitter just because two things sit side by side; only when the user genuinely benefits from adjusting the ratio.
- Narrow or mobile viewports - a draggable divider is impractical on touch-first layouts; stack the panels instead.
- More than two panels needing independent resizing - nest multiple Splitters deliberately rather than trying to force one divider to manage three or more regions.
Best Practices
- Persist the user's chosen split ratio across sessions when the layout is one they'll return to repeatedly.
- Enforce sensible minimum sizes on both panels so neither can be dragged down to an unusable sliver.
- Make the divider's hit target noticeably wider than its visible line, so it's easy to grab precisely.
Do and Don't
Do
Two panels the user genuinely wants to resize against each other, with a visible drag handle marking the boundary.
Don't
A 15%-wide panel gives the user almost nothing to drag toward - there is no meaningful second layout to resize into. Use a fixed Sidebar instead.
Accessibility
- The divider is a real, keyboard-operable control (arrow keys nudge the split ratio), not a mouse-only drag handle.
- The divider exposes its current position and valid range to assistive technology, similar to a slider.
- A collapsed panel's expand control has an accessible name identifying which panel it restores.
Related Components
Transfer, Card, Tabs.
{
"component": "Splitter",
"status": "Experimental",
"category": "Data Display",
"summary": "Splitter is a resizable two-panel layout with a draggable divider between them, letting the user redistribute space between the two panels.",
"whenToUse": [
"A resizable sidebar next to a main content area.",
"A code editor and its live preview pane, both resizable.",
"A master/detail layout, like a chat list next to a conversation pane."
],
"whenNotToUse": [
"A fixed layout where resizing adds no real value.",
"Narrow or mobile viewports where a draggable divider is impractical.",
"More than two panels needing independent resizing - nest multiple Splitters instead."
],
"bestPractices": [
"Persist the user's chosen split ratio across sessions for layouts they return to.",
"Enforce sensible minimum sizes on both panels.",
"Make the divider's hit target wider than its visible line."
],
"doAndDont": {
"do": "Two panels the user genuinely wants to resize against each other, with a visible drag handle marking the boundary.",
"dont": "A 15%-wide panel gives the user almost nothing to drag toward - there is no meaningful second layout to resize into. Use a fixed Sidebar instead."
},
"accessibility": [
"The divider is keyboard-operable (arrow keys nudge the split ratio), not mouse-only.",
"The divider exposes its current position and valid range, similar to a slider.",
"A collapsed panel's expand control has an accessible name identifying which panel it restores."
],
"relatedComponents": [
"Transfer",
"Card",
"Tabs"
]
}