Resizable panels
Two panels separated by a draggable, keyboard-operable divider.
Notes have 58% of the width.
When to use
- Editors and previews side by side.
- Master-detail layouts where people choose the split.
When not to use
- The layout should never change; use a fixed grid.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/resizable-panels
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ResizablePanels
7 props
PropTypeDefault
start *ReactNode—
end *ReactNode—
labelstring"Resize panels"
defaultSizenumber58
minnumber28
onSizeChange((size: number) => void)—
classNamestring—
Keyboard
- ←
- Moves to the previous item or value.
- →
- Moves to the next item or value.
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
- Enter
- Activates the focused control.
Accessibility
It exposes separator semantics, with aria-orientation, aria-valuemin, aria-valuemax, aria-valuenow, aria-label and aria-valuetext kept in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/resizable-panels.mdThe index of every part is at /llms.txt.