Overview
Filter results
Narrow down your search results.
Last 7 days
Last 30 days
For side-sliding panels on desktop, use
Sheet instead. Drawer is optimized for bottom-sheet patterns.Installation
Usage
Variants
Basic Drawer
With Snap Points
Controlled
API Reference
Drawer (Root)
boolean
Controlled open state.
(open: boolean) => void
Callback fired when the open state changes.
boolean
default:"true"
Scales the background app content when the drawer opens.
number[]
Snap point heights as percentages (0–1). The drawer snaps to these heights on drag.
DrawerContent
string
Additional Tailwind classes for custom overrides.
Accessibility
- Drawer uses
role="dialog"witharia-modal="true" - Focus is trapped inside the drawer while open
- Pressing Escape closes the drawer
- The drag handle has
aria-label="Drag handle"for screen readers - Focus returns to the trigger when the drawer closes
Do’s & Don’ts
Do
- Use Drawer for mobile action sheets and quick filters
- Always include a clear close action (Cancel button or swipe down)
- Use
snapPointsfor Drawers with variable content height - Keep drawer content focused on a single task
Don't
- Don’t use Drawer for desktop-primary layouts — use Sheet or Modal
- Don’t stack drawers inside other drawers
- Don’t put complex multi-step forms in a Drawer
- Don’t rely on the drag-to-close gesture as the only close mechanism