Resizable
Adjustable panel layout primitives for dense product workspaces that need user-controlled balance.
Copy a concise page brief or the full MDX source without digging through the docs shell.
Resizable panels are for workspaces where the right balance changes by task. The Swiss wrapper keeps the panel API close to react-resizable-panels, then adds quieter dividers and an optional handle treatment that fits the rest of the system.
Installation
Purchase access, then open /account/install to issue a registry token.Usage
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from "@/components/ui/resizable"<ResizablePanelGroup orientation="horizontal">
<ResizablePanel defaultSize={35}>Navigation</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel defaultSize={65}>Content</ResizablePanel>
</ResizablePanelGroup>Why This Primitive Exists
Some interfaces should adapt without sending the user into a different layout mode.
- Use resizable panels for dense product surfaces like archives, operations tools, and review workspaces.
- Prefer them when two or more panes stay relevant, but the user may need to bias attention toward one of them.
- Avoid them for simple marketing or document pages where the split adds control without adding clarity.
Examples
Basic Horizontal Split
The baseline pattern is a side navigation or inspector paired with a larger work area.
<ResizablePanelGroup orientation="horizontal">
<ResizablePanel defaultSize={38} minSize={24}>Sidebar</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel defaultSize={62} minSize={40}>Main panel</ResizablePanel>
</ResizablePanelGroup>Vertical Stacks
Vertical groups work well when one pane summarizes the state and the other carries detail, activity, or logs.
<ResizablePanelGroup orientation="vertical">
<ResizablePanel defaultSize={48}>Summary</ResizablePanel>
<ResizableHandle />
<ResizablePanel defaultSize={52}>Activity</ResizablePanel>
</ResizablePanelGroup>In Context
For product tools, resizable panels often sit inside a card or page shell rather than becoming a special full-screen system.
Operations layout
The split lives inside a normal card shell, which keeps the interaction legible without turning it into a special layout system.
Guidance
Start With A Real Layout Need
- Add a resizable split when users genuinely need to rebalance adjacent panes.
- If one pane is rarely useful, hide or collapse it instead of making it resizable.
- Keep the default ratio sensible so the layout still works before anyone drags a handle.
Protect Minimum Sizes
- Set
minSizefor panes that need a readable lower bound. - Use larger minimums for forms, tables, and inspectors with fixed metadata rows.
- Do not rely on the handle alone to keep a panel usable.
Keep Pane Roles Clear
- Use the left or top pane for navigation, lists, or overview.
- Use the right or bottom pane for editing, detail, or contextual review.
- Add the visible
withHandlegrip when the resize affordance should be more explicit.
API Reference
Exports
| Export | Renders | Notes |
|---|---|---|
ResizablePanelGroup | react-resizable-panels group | Flex wrapper that switches layout direction from the orientation prop. |
ResizablePanel | react-resizable-panels panel | Individual pane with the upstream sizing API. |
ResizableHandle | react-resizable-panels resize handle | Divider line with optional visible grip. |
Notable Props
| Export | Prop | Type | Notes |
|---|---|---|---|
ResizablePanelGroup | orientation | "horizontal" | "vertical" | Sets the layout axis. |
ResizablePanelGroup | className | string | Extends the base flex container. |
ResizablePanel | defaultSize | number | Initial percentage size. |
ResizablePanel | minSize, maxSize | number | Bounds to keep panels usable. |
ResizablePanel | collapsible, collapsedSize | upstream panel props | Use when a pane may intentionally collapse. |
ResizableHandle | withHandle | boolean | Adds the small visible grip inside the divider. |
ResizableHandle | className | string | Extends the divider styling. |
Visual Notes
| Area | Detail |
|---|---|
| Divider | Thin border line by default so the split stays structural, not decorative. |
| Handle target | Invisible hit area remains wider than the line for easier dragging. |
| Vertical groups | The same handle adapts to horizontal divider placement automatically. |
The component family is intentionally close to react-resizable-panels, so the upstream panel persistence and callback props remain available.