Resizable
Panels resized by dragging or the keyboard, composed from Group, Panel, and Handle.
Sidebar
Content
When to use
- Use when
- Side-by-side panes whose size people adjust, such as an editor and a preview.
- Avoid when
- The layout works at fixed sizes; resizing adds a control nobody asked for.
Installation
The source lands in src/components/ui/resizable.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.
Usage
Examples
Vertical
Header
Content
Nested
Groups nest to build an editor-style layout.
Sidebar
Content
Terminal
Built on
Verified
- Size
- 1.3 kB gzipped on its own, 19 kB with the Shelf items and packages it builds on. JS and CSS in a production build, without React.
- Accessibility
- Axe passes on 6 stories
- Behavior
- 6 interaction tests in Storybook
- React Doctor
- React Doctor finds nothing