Drawer
Presents mobile-first actions or content in a bottom panel with swipe dismissal and optional snap points.
@rivetui/drawerPreview
Explore each composition interactively, then open its code in the same context.
Default
Deployment / Mobile actions
Production deployment
Keep the current view visible while presenting focused actions.
Snap points
Snap points accept viewport fractions, pixels, or rem values and can be controlled.
Registry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/drawerPublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
Drawer
| Prop | Type | Default |
|---|---|---|
open | boolean | — |
defaultOpen | boolean | false |
onOpenChange | (open: boolean, details) => void | — |
snapPoints | (number | string)[] | — |
snapPoint | number | string | null | — |
defaultSnapPoint | number | string | null | first snap point |
onSnapPointChange | (snapPoint: number | string | null, details) => void | — |
snapToSequentialPoints | boolean | false |
modal | boolean | "trap-focus" | true |
DrawerContent
| Prop | Type | Default |
|---|---|---|
showHandle | boolean | true |
className | string | — |