Resizable
Panels you resize by dragging the handle between them, or by keyboard. A panel can fold away and back, and every change that isn’t a drag glides.
Examples
Default
Drag a handle, or focus it and use the arrow keys. The sidebar is collapsible: drag it past its smallest size, press Enter on its handle, or call collapse() from a button, and it folds away.
Gutter
With variant="gutter" each panel is a surface of its own, and the gap between them is the handle. Its grip shows under the pointer and while the handle has focus.
Vertical
Set orientation to vertical to stack the panels. Sizes in pixels, such as minSize="72px", keep a panel from closing up on a short screen.
Nested
A group inside a panel resizes on its own, and takes the variant of the group around it.
Installation
npx shadcn@latest add https://kinoui.com/r/resizable.json- Files
lib/reduce-motion.tslib/grip.tslib/refs.tslib/resize.tslib/scroll.tscomponents/kino/resizable.tsx- Packages
class-variance-authorityreact-resizable-panels- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
ResizablePanelGroup
ResizablePanel
ResizableHandle
Data attributes
Accessibility
- Each handle is a focusable separator, as in the WAI-ARIA window splitter pattern: the arrow keys step it, Home and End take it to its ends, and Enter folds a collapsible panel away and back. Name it with
aria-label. - A panel whose content is larger than it takes focus as a region, so the keyboard can scroll it. A folded panel is
inert, so Tab skips what can’t be seen. - Around each handle, 24 pixels by mouse and 40 by touch can grab it, though the line is 1 pixel wide.
- In forced colours the line and the grip take the system’s text colour.
- When the system asks for less motion, the panels take their new size at once, and the grip doesn’t stretch.
- In right to left, Enter folds the panel on the left of the handle. Dragging and the arrow keys follow the direction.