Drawer
Slide-in panel from screen edges for secondary content and navigation.
Import
Basic Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | - | Whether the drawer is open (controlled) |
| defaultOpen | boolean | - | Default open state (uncontrolled) |
| onOpenChange | (open: boolean) => void | - | Callback when open state changes |
| side | 'left' | 'right' | 'top' | 'bottom' | 'left' | Side the drawer slides in from |
| title | React.ReactNode | - | Drawer title displayed in the header |
| description | React.ReactNode | - | Drawer description (optional subtitle) |
| children | React.ReactNode | - | Drawer content |
| trigger | React.ReactElement | - | Trigger element for uncontrolled usage |
| className | string | - | Additional CSS class names for the drawer panel |
Variants
Right Side
Bottom Side
With Content
Side Variants
Controlled
Compound Components
For advanced usage: