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
ariaLabelstringAlias of `label` — the same invisible accessible name under the catalog spelling. Neither is deprecated.
labelstringAccessible label for the resize handle.
childrenReactNodeExactly two panes
orientation'horizontal' | 'vertical'horizontalAxis the panes are split along. `horizontal` puts them side by side with a handle you drag left and right; `vertical` stacks them with a handle you drag up and down.
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