Sidebar
Editor
Terminal
Installation
$ pnpm dlx shadcn@latest add @synccn/resizableFirst time in this project? Connect synccn with one command.
Usage
import { ResizablePanels } from "@/components/ui/resizable";<ResizablePanels defaultSizes={[30, 70]}>…</ResizablePanels>API reference
Generated from the component's TypeScript types, so it always matches the code.
ResizablePanels
Two or more panels split by draggable handles. sizes are percentages. Handles also respond to arrow keys.
PropTypeDescription
- direction
"horizontal" | "vertical"Default
"horizontal"Split side by side or stacked.
- defaultSizes
number[]Starting sizes as percentages, one per panel.
- minSize
numberDefault
15Smallest panel size as a percentage.
- children
React.ReactNodeContent to render.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
- lucide-react for GripVertical
Keyboard
- ←or→or↑or↓Move the focused handle
Accessibility
- Handles are focusable separators with aria-valuenow.
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA roles: separator
- ARIA attributes: aria-orientation, aria-valuenow
- Keys handled: ArrowUp, ArrowDown, ArrowLeft, ArrowRight
- Shows a visible focus ring for keyboard users
More display
CardSurface with header, content and footer slots.BadgeSmall status label with an optional dot.AvatarImage with initials fallback, presence dot and stacked groups.KbdKeyboard key for shortcuts and hints.SeparatorHorizontal, vertical or labelled divider.AccordionExpanding sections with smooth height animation.