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.
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