Scroll area
A native scroll container with thin overlay scrollbars and edge fades that appear only when content overflows.
Trade space between panes by dragging the divider between them.
npx shadcn@latest add @silicon-ui/resizable-panelsnpx shadcn@latest add @silicon-ui/resizable-panelsInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/resizable-panels/resizable-panels.tsxcomponents/silicon-ui/resizable-panels/resizable-panels.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
ResizablePanels| Prop | Type | Default |
|---|---|---|
children*`ResizablePanel` elements, in order. The set of panes should stay the same for the life of the group. | ReactNode | — |
labelNames the group for assistive technology. | string | — |
onLayoutChangeCalled with each pane's share in percent after a resize settles. | (sizes: number[]) => void | — |
className | string | — |
ResizablePanel| Prop | Type | Default |
|---|---|---|
id*Stable id, also used by the dividers' `aria-controls`. | string | — |
label*Names the pane for its divider, for example "Folders". | string | — |
defaultSize*Starting share of the group. Shares are relative, so they need not add up to 100. | number | — |
minSizeWidth in px where the pane starts to resist. Its content never reflows below it; it clips and fades instead. | number | — |
maxSize | number | — |
collapsibleDragging well past the minimum, or flicking toward the edge, snaps the pane closed. Its divider then shows a restore tab. | boolean | — |
defaultCollapsed | boolean | — |
className | string | — |
children | ReactNode | — |