Drawer
A sheet on the bottom edge with a handle, snap points and drawers stacked on top.
npx shadcn add https://kinoui.com/r/drawer.jsonCopy install command
Examples
Default
It slides up from the bottom edge with a handle on top. Swipe it down to close it.
Snap points
With snapPoints, it rests at more than one height. This one opens fully and is dragged down to a peek, and its handle becomes a button that does the same.
Content that changes height
When content appears or goes, the drawer moves to its new height.
A drawer on a drawer
Put the second Drawer inside the first one’s content. It stacks on top, and the first dims.
Recede
With variant="recede", the page in DrawerIndent steps back behind the drawer, as this page does, and a drawer steps back behind one opened on top of it.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/drawer.json- Files
lib/controllable.tslib/reduce-motion.tslib/grip.tslib/resize.tslib/scroll.tslib/panel.tsxlib/popup.tslib/refs.tslib/swap.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxcomponents/kino/sheet.tsxcomponents/kino/drawer.tsx- Packages
@base-ui/reactclass-variance-authority- 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
Drawer
CSS variables
Accessibility
- It follows the modal dialog pattern: focus moves in, Tab stays inside, and Escape or a press outside closes it.
- A swipe is never the only way: the close button closes it, and with snap points the handle is a button named “Expand” or “Collapse”.
- Its text can be selected with a mouse without dragging it.
- When the system asks for less motion, the drawer fades in and out where it stands. A finger still drags it.