Resizable
Panels you can resize by dragging, with min and max sizes, keyboard control and a double-click reset that springs back.
Data Display
InboxAll mailStarredDraftsSentArchive
Weekly sync notes
Tap to read the full thread
Invoice #2041
Tap to read the full thread
Your build is ready
Tap to read the full thread
Design review
Tap to read the full thread
Weekly sync notes
From Léa · 9:41
Drag the handles to resize. Double-click one to snap the panels back to their default sizes.
Playground
Tweak the props, the preview and the code follow.
Panel 1
Panel 2
Panel 3
Props
3
15
<ResizablePanelGroup direction="horizontal">
<ResizablePanel minSize={15}>Panel 1</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel minSize={15}>Panel 2</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel minSize={15}>Panel 3</ResizablePanel>
</ResizablePanelGroup>Installation
npx @plumsydev/plum-ui add resizableUsage
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"<ResizablePanelGroup direction="horizontal">
<ResizablePanel defaultSize={30} minSize={20}>Sidebar</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel>Content</ResizablePanel>
</ResizablePanelGroup>Examples
Vertical
export default function Page() { return <Dashboard /> }
$ pnpm dev
▲ Ready on http://localhost:3000
✓ Compiled in 312ms
Nested
Groups nest freely. onLayout reports sizes so you can persist them.
Sidebar30%
Editor60%
Terminal40%
API Reference
ResizablePanelGroup
| Prop | Type | Default |
|---|---|---|
directionLayout axis. | "horizontal" | "vertical" | "horizontal" |
onLayoutSizes in percent after every change. | (sizes: number[]) => void | — |
ResizablePanel
| Prop | Type | Default |
|---|---|---|
defaultSizeInitial size in percent. Panels without one share the rest. | number | — |
minSizeMinimum size in percent. | number | 0 |
maxSizeMaximum size in percent. | number | 100 |
ResizableHandle
| Prop | Type | Default |
|---|---|---|
withHandleShow a grip in the middle of the divider. | boolean | false |
Notes
- Handles are focusable: arrows move by 2%, Shift + arrows by 10%, Enter resets.
- Panels and handles must be direct children of the group so it can pair neighbours.