Drawer
stableA bottom-anchored sheet, ideal for mobile.
Basic usage
Examples
With footer actions
A confirmation drawer with primary and cancel actions in the footer.
Mobile action drawer
Drawer is a bottom sheet variant for dense mobile workflows.
Features
- Drag-handle affordance.
- Slides up from the bottom.
Installation
bash
pnpm dlx structyl add drawerAPI Reference
Drawer.Root
Contains all drawer parts (bottom sheet).
| Prop | Type | Default |
|---|---|---|
| open | booleanControlled open state. | — |
| onOpenChange | (open: boolean) => voidCalled when open state changes. | — |
Drawer.Trigger
Opens the drawer.
| Prop | Type | Default |
|---|---|---|
| asChild | booleanMerge props onto the immediate child instead of rendering a default element. | false |
Drawer.Content
The bottom-anchored panel.
| Prop | Type | Default |
|---|---|---|
| className | stringAdditional Tailwind classes, merged with the component defaults. | — |