Sheet
A panel that slides in from any edge and is swiped back to it to close.
npx shadcn add https://kinoui.com/r/sheet.jsonCopy install command
Examples
Default
It slides in from the end edge. Swipe or drag it back to close it: the faster it is let go, the faster it leaves.
Sides
Set side to start, top, bottom or end. Start and end follow the text direction.
Long content
Put what can grow in SheetBody. It scrolls, and the header and the footer stay in place.
Recede
With variant="recede", the page steps back behind the sheet: open it to see this page do it. Wrap the page in SheetIndent, once, around everything else.
Controlled
A sheet opened with the open prop needs no trigger. When it closes, focus goes back to what had it before.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/sheet.json- Files
lib/reduce-motion.tslib/resize.tslib/scroll.tslib/panel.tsxlib/popup.tslib/refs.tslib/swap.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxcomponents/kino/sheet.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
Sheet
SheetContent
SheetBody
CSS variables
Accessibility
- Focus moves into the sheet when it opens, Tab stays inside it, and Escape or a press outside closes it. Focus then goes back to the trigger.
- Every sheet needs a
SheetTitle, which names it for a screen reader. Give itsr-onlyto hide it. - A swipe is never the only way to close it: the close button, Escape and a press outside all close it too.
- While the body scrolls it takes focus first, so the arrow keys scroll it, and a screen reader hears it as a region named by the title.
- When the system asks for less motion, the sheet fades in and out where it stands, and the page doesn’t step back. A finger still drags it.