2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

SplitView

Updated: April 20, 2025
View on GitHub
The SplitView component creates a resizable divider between two panels, allowing users to adjust the size ratio. It supports both horizontal and vertical layouts with customizable resize handles. SplitView also supports vertical orientation for top-bottom layouts. You can customize the resize handle size, appearance, and set minimum/maximum split ratios.
Prop
Type
Default
leftPanelrequired
Content on the left.
ReactNode
rightPanelrequired
Content on the right.
ReactNode
labels
Tab labels used once the view has collapsed.
{ left: string; right: string }
collapseBelow
Breakpoint at which it becomes tabs. false keeps it split at every width.
BreakpointKeyfalse
s
defaultSplit
Starting position of the divider, as a fraction.
number0.3
minSplit
How far left the divider can go.
number0.2
maxSplit
How far right the divider can go.
number0.8
…and every FlexProps propinherited
At or below collapseBelow (default s) the split becomes tabs showing one panel at a time, and the drag handle is not rendered. A drag-resizable split is a poor pattern on a phone whichever way it is oriented: neither pane is usable at any ratio, and a drag handle competes with page scrolling. Pass labels so the tabs are named, or collapseBelow={false} to keep the split at every size.
  • Accessibility: the divider is a focusable role="separator" — arrow keys move it in 5% steps within minSplit/maxSplit, and it reports its position through aria-valuenow
  • Input: dragging uses pointer events, so it works with a mouse, a pen and touch alike
  • Responsive: collapses to tabs on small screens rather than shrinking two panes past usefulness
  • Constraints: Set min/max split ratios to prevent panels from becoming too small
  • Visual Feedback: Handle changes color when being dragged for better UX
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club