Sheet
A panel that slides in from an edge of the screen and swipes away: navigation on phones, filters, details, a bottom sheet.
Installation
Or with the shadcn CLI, from the registry:
Usage
SheetHeader and SheetFooter carry their own padding; give the body between them px-6. The footer sits at the
bottom of the panel, and the body scrolls when it is taller than the screen.
Sides and sizes
side is right (the default), left, top or bottom. Swiping the panel back toward its edge closes it, on touch
screens and with a mouse. A bottom sheet shows a handle and rounds its top corners. size sets the width of a side
panel (sm, default, lg) and the height of a top or bottom one.
Sheet is built on Base UI's Drawer, so a bottom sheet can also stop
halfway: pass snapPoints to Sheet. shadcn's Drawer (vaul) and Sheet are one component here.
Villages
The panel is a dialog of the same village: its surface, border, shadow, blur and motion. Kiri's is translucent, Iwa's has a heavy edge on the side that faces the page.
Accessibility
- A modal dialog: focus moves into the panel and stays there until it closes, and the page behind is inert.
- Name it with
SheetTitleand describe it withSheetDescription; both are linked to the panel. - Escape, a click outside, the close button and a swipe all close it. Focus then returns to the trigger.
- With reduced motion the panel appears without sliding.
API reference
| Component | Props |
|---|---|
Sheet | Base UI Drawer.Root: open, defaultOpen, onOpenChange, modal, snapPoints… The swipe direction follows the content's side |
SheetTrigger, SheetClose | Base UI Drawer.Trigger and Drawer.Close, with render |
SheetContent | side: "top" | "right" | "bottom" | "left" (default "right"), size: "sm" | "default" | "lg", showCloseButton (default true) |
SheetHeader, SheetFooter | The props of <div> |
SheetTitle, SheetDescription | Base UI Drawer.Title and Drawer.Description |
sheetContentVariants({ side, size }) returns the panel's classes.