Resizable
betaPanels side by side or stacked, with handles to resize them by pointer or keyboard, limits per panel, and panels that collapse.
- Layout
- 1 file
- 1 npm package
- Accessibility notes
pnpm dlx @dowel-ui/cli add resizablenpm packages installed: class-variance-authority.
import { ResizablePanelGroup } from "@/components/ui/resizable";Default
Editor Layout
<ResizablePanelGroup>
| Prop | Type | Default |
|---|---|---|
direction | "horizontal" | "vertical" | "horizontal" |
onLayoutCalled with every panel's size, in order, whenever a handle moves one. | (sizes: number[]) => void | — |
Plus every attribute of <div>.
<ResizablePanel>
| Prop | Type | Default |
|---|---|---|
collapsedSizeSize when collapsed, in percent. Default 0. | number | 0 |
collapsibleCan be closed to | boolean | false |
defaultSizeStarting size, as a percentage of the group. Panels without one share what is left. | number | — |
maxSizeLargest size, in percent. Default 100. | number | 100 |
minSizeSmallest size, in percent. Default 10. | number | 10 |
Plus every attribute of <div>.
<ResizableHandle>
| Prop | Type | Default |
|---|---|---|
keyboardStepPercent moved per arrow key press; Shift moves ten times as far. Default 1. | number | 1 |
withHandleShow a grip in the middle of the handle. Default false. | boolean | false |
Plus every attribute of <div>.
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes