ResizablePanels
ShowcaseComponentsResizablePanels
Layout

ResizablePanels.

Two independently scrollable surfaces with drag-to-resize and arrow-key resizing.

Real interactive component
Live demo
Folders

Inbox

Projects

Archive

Workspace

Drag the handle or focus it and use arrow keys to resize.

Selected content

The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.

Props & API reference

Parameters available in the shared component, including value types, requirements and accepted options.

10 props
ParameterTypeRequiredDefaultPossible valuesDescription
firstReactNodeYes——Contents of the first panel.
secondReactNodeYes——Contents of the second panel.
direction"horizontal" | "vertical"Nohorizontalhorizontal · verticalSplit orientation.
defaultSizenumberNo45—Initial percentage allocated to the first panel.
minSizenumberNo20—Minimum first-panel percentage.
maxSizenumberNo80—Maximum first-panel percentage.
onSizeChange(percent: number) => voidNo——Called after resizing.
firstLabelstringNoFirst panel—Accessible first-panel label.
secondLabelstringNoSecond panel—Accessible second-panel label.
classNamestringNo——Additional CSS class on the outer component element.