What it does
Horizontal and vertical split layouts with controlled or uncontrolled percentages, per-panel bounds, collapse/restore, and independently themed panel and handle surfaces.
Common use cases
- Navigation and detail layouts.
- Code editors with preview and console panes.
- Nested dashboard and analytics workspaces.
- Vertical tool panels on narrow screens.
Accessibility
Handles expose focusable separator semantics, accessible labels, value bounds, and controls relationships. Keep panel IDs unique in the document and label each handle for its primary pane.
FAQ
How are panel sizes measured?
Sizes are percentage shares of pane space, excluding resize handles. They total 100; dragging adjusts only the adjacent pair. Every panel has a stable DOM id.
What keyboard controls are available?
Use Left/Right for horizontal layouts or Up/Down for vertical layouts. Shift increases the step by ten. Home/End move to the available limits; Enter collapses or restores the preceding collapsible pane.
Does a vertical layout require a height?
Yes. Set a height on the group or place it inside a parent that establishes one. Panes scroll independently when their content exceeds the available space.
Can I save panel sizes?
Use controlled sizes and onSizesChange in your own state. Save onResizeEnd to avoid writing on every pointer movement. The component does not access localStorage during server rendering.
What happens to collapsed content?
Content remains mounted. A zero-sized pane is inert and hidden from assistive technology; a nonzero collapsed rail remains accessible.
What are the composition rules?
Use direct alternating Panel, Handle, Panel children. Arrays and fragments are supported. Each nested group owns independent state. Expanded minima must total at most 100 and maxima at least 100; invalid composition or constraints throw an actionable error.
Does it need an animation dependency?
No. The static entry uses React and native pointer capture. It respects horizontal RTL direction and supports mouse, pen, and touch.