Sheet
A panel that slides in from an edge for supporting content: filters, details, settings, share options. Bottom sheets can be dragged down to dismiss.
Install
npx shadcn@latest add @nelumbo/sheetSides
Right is the default. The inner corners are rounded so the sheet reads as a layer above the page.
Filters
A side sheet holding a full form: chips, a range slider, checkboxes and a switch. The middle scrolls; the footer stays put.
Bottom sheet
Bottom sheets have a drag handle instead of a close button. Drag down past a third of the height, or flick, to dismiss; otherwise it springs back. Tapping the handle closes it too.
Usage
import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetBody, SheetFooter, SheetClose } from "@/components/ui/sheet"<Sheet> <SheetTrigger asChild><Button>Filters</Button></SheetTrigger> <SheetContent side="right"> <SheetHeader><SheetTitle>Filters</SheetTitle></SheetHeader> <SheetBody>…</SheetBody> <SheetFooter><Button>Show results</Button></SheetFooter> </SheetContent></Sheet>Props
Sheet, SheetTrigger and SheetClose take Radix Dialog props (open, onOpenChange…).
| Prop | Type | Default | Notes |
|---|---|---|---|
side | "right" | "left" | "top" | "bottom" | "right" | |
floating | boolean | false | 8px off the edge, all corners rounded |
showCloseButton | boolean | true (false for bottom) | Bottom sheets use the drag handle |
SheetBody | The scrolling middle |