Overlays
Drawer
a bottom sheet you can drag down (vaul) · mobile-first quick actions and filters
<Drawer> <DrawerTrigger asChild> <Button variant="outline">Filter invoices</Button> </DrawerTrigger> <DrawerContent> <div className="mx-auto w-full max-w-sm"> <DrawerHeader> <DrawerTitle>Filter invoices</DrawerTitle> <DrawerDescription>Show only what you need to act on.</DrawerDescription> </DrawerHeader> <div className="flex flex-col gap-3 px-4"> {['Overdue', 'Due this week', 'Drafts'].map((f) => ( <div key={f} className="flex items-center gap-3"> <Checkbox id={`drawer-${f}`} defaultChecked={f === 'Overdue'} /> <Label htmlFor={`drawer-${f}`} className="font-normal"> {f} </Label> </div> ))} </div> <DrawerFooter> <DrawerClose asChild> <Button>Show 3 invoices</Button> </DrawerClose> <DrawerClose asChild> <Button variant="outline">Cancel</Button> </DrawerClose> </DrawerFooter> </div> </DrawerContent></Drawer>Usage
Phone-sized web flows: filters, a quick form, a share menu. On desktop use Dialog or Sheet.
API
<Drawer><DrawerTrigger asChild /><DrawerContent><DrawerHeader><DrawerTitle /></DrawerHeader>…<DrawerFooter /></DrawerContent></Drawer>Get it
Already in every copy of the web kit:
import { Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerFooter, DrawerClose } from '@/components/ui/drawer';Details
- Exports
Drawer,DrawerTrigger,DrawerContent,DrawerHeader,DrawerTitle,DrawerDescription,DrawerFooter,DrawerClose- Also searched as
- bottom sheet, action sheet, swipe
- Upstream
- Unchanged from shadcn/ui; installs from their registry.
Agents: the whole registry is at /llms.txt.