Skip to content
nexubDesign System
v11.9.0

Components · Layout

Resizable Panels

BetaAdded v6.4.0

Panels with draggable separators, for list–detail and editor layouts.

import { ResizablePanels } from '@nexub/react';
View as Markdown

Playground

Props

direction
  • Quarterly report
  • Launch checklist
  • Hiring plan
Drag the line, or focus it with Tab and use the arrow keys.
TSX
<ResizablePanels defaultSizes={[35, 65]} minSizes={[20, 30]} className={…}>…</ResizablePanels>

Examples

List and detail

  • Quarterly report
  • Launch checklist
  • Hiring plan
Drag the line, or focus it with Tab and use the arrow keys.

Props

Props
PropTypeDefaultDescription
childrenrequiredReact.ReactNode—The panels; a separator goes between each pair.
direction'horizontal' | 'vertical''horizontal'Side by side or stacked.
sizesnumber[]—One percentage per panel, adding up to 100. Save them (localStorage, user settings) to restore the layout.
defaultSizesnumber[]—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.
minSizesnumber[]10 eachSmallest size per panel, in percent.
handleLabelstring—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