docs/components/resizable
Sections
Components
Utilities
Forms
Hooks
Copy Markdown
Divides the interface into resizable sections.
PreviewCode
One
Two
Three
CLIManual
pnpmbunnpmyarn
pnpm dlx shadcn@latest add @shark/resizable
Resizable
├── ResizablePanel
└── ResizableResizeTrigger
import {
Resizable,
ResizablePanel,
ResizableResizeTrigger,
} from "@/components/ui/resizable";
<Resizable>
<ResizablePanel id="1" />
<ResizableResizeTrigger id="1:2" />
<ResizablePanel id="2" />
</Resizable>
Use the orientation prop to control the orientation of the resizable panels.
Set orientation="horizontal" to place panels side by side (default).
PreviewCode
Left
Right
Set orientation="vertical" to stack panels vertically.
PreviewCode
Top
Bottom
Use the withHandle prop on ResizableResizeTrigger to show a visible grip handle for resizing.
PreviewCode
Panel 1
Panel 2
Use panels with minSize and maxSize to constrain how small or large a panel can be resized.
PreviewCode
Sidebar
Content
PreviewCode
Left
Center
Right
Root component. Manages resizable panel layout.
| Prop | Type | Default |
|---|---|---|
panels | PanelData[] | - |
defaultSize | number[] | - |
size | number[] | - |
orientation | `"horizontal" | "vertical"` |
keyboardResizeBy | number | - |
onResize | (details: ResizeDetails) => void | - |
onResizeStart | () => void | - |
onResizeEnd | (details: ResizeEndDetails) => void | - |
onCollapse | (details: ExpandCollapseDetails) => void | - |
onExpand | (details: ExpandCollapseDetails) => void | - |
className | string | - |
A resizable panel. Multiple panels share the available space.
| Prop | Type | Default |
|---|---|---|
id | string | - |
asChild | boolean | false |
className | string | - |
Draggable handle between panels for resizing.
| Prop | Type | Default |
|---|---|---|
id | ${string}:${string} | - |
withHandle | boolean | false |
disabled | boolean | - |
asChild | boolean | false |
className | string | - |
For a complete list of props, see the Ark UI documentation.
[
Previous page
Rating ](/docs/components/rating)[
Next page
Scroll Area ](/docs/components/scroll-area)
On This Page
InstallationAnatomyUsageOrientationHorizontalVerticalExamplesHandleMin / Max SizeMultiple PanelsAPI ReferenceResizableResizablePanelResizableResizeTrigger