Skip to content
TrademarkTrademark
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.

Vertical Layout

SplitView also supports vertical orientation for top-bottom layouts.

Customization

You can customize the resize handle size, appearance, and set minimum/maximum split ratios.

API reference

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—

Small screens

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.

Usage Guidelines

  • 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