Resizable

Two-pane splitter whose divider can be dragged or keyboard-nudged to reallocate space

Category: layout · WCAG 2.2-AA · splitter, panes, layout, resize, divider

Props

PropTypeDefaultDescription
labelstringAccessible label for the resize handle.
childrenReactNodeExactly two panes
orientation'horizontal' | 'vertical'horizontalLayout orientation of the component.
defaultRationumber0.5The initial split ratio when uncontrolled.
rationumberControlled ratio (0–1)
minRationumber0.1Minimum allowed split ratio.
maxRationumber0.9Maximum allowed split ratio.
onRatioChange(ratio: number) => voidCalled with the new split ratio when it changes.

Design tokens

When to use

When not to use

How to build an accessible Resizable in React →

Examples

Horizontal split

<Resizable>
  <Editor />
  <Preview />
</Resizable>

Vertical with bounds

<Resizable orientation="vertical" defaultRatio={0.3} minRatio={0.2} maxRatio={0.8}>
  <Toolbar />
  <Canvas />
</Resizable>

Related components

← Back to docs