Components › Display
Resizable panels
Two panels with a handle between them that you drag or move with the arrow keys.
Installation
npx plankui@latest add resizableUsage
import { Resizable } from "@/components/ui/resizable";
<Resizable label="sidebar" defaultSize={30}>{[<Sidebar />, <Main />]}</Resizable>API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| children | [ReactNode, ReactNode] | required | The two panels; the first one resizes. |
| direction | "horizontal" | "vertical" | "horizontal" | Side by side, or stacked. |
| defaultSize | number | 50 | First panel's size in percent. |
| min / max | number | 15 / 85 | Limits in percent. |
| onResize | (size: number) => void | Called with the new size. | |
| label | string | "panel" | Name of the first panel, for the handle's label. |