Components · Layout
Resizable Panels
BetaAdded v6.4.0
Panels with draggable separators, for list–detail and editor layouts.
import { ResizablePanels } from '@nexub/react';Playground
Props
direction
- Quarterly report
- Launch checklist
- Hiring plan
Drag the line, or focus it with Tab and use the arrow keys.
<ResizablePanels defaultSizes={[35, 65]} minSizes={[20, 30]} className={…}>…</ResizablePanels>Examples
List and detail
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| childrenrequired | React.ReactNode | — | The panels; a separator goes between each pair. |
| direction | 'horizontal' | 'vertical' | 'horizontal' | Side by side or stacked. |
| sizes | number[] | — | One percentage per panel, adding up to 100. Save them (localStorage, user settings) to restore the layout. |
| defaultSizes | number[] | — | One percentage per panel, adding up to 100. Save them (localStorage, user settings) to restore the layout. |
| onSizesChange | ((sizes: number[]) => void) | — | One percentage per panel, adding up to 100. Save them (localStorage, user settings) to restore the layout. |
| minSizes | number[] | 10 each | Smallest size per panel, in percent. |
| handleLabel | string | — | Names the separators. |
Accessibility
ARIA roles
separator (focusable, with aria-valuenow / min / max and aria-controls)
Keyboard
- Arrow keys
Move the focused separator by 5%. Mirrored in RTL.
- Home / End
To the smallest or largest size.
- Enter
Back to the default split.
On iOS & Android
Web only
Resizable Panels has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.