Custom Variants
TheDrawerVariants component provides pre-styled drawer layouts for common patterns. Choose from sheet, dialog, sidebar, minimal, or default variants.
What This Example Shows
- Sheet variant (iOS-style bottom sheet)
- Dialog variant (center modal)
- Sidebar variant (navigation drawer)
- Pre-configured styling and positioning
- Easy switching between different drawer styles
Available Variants
Sheet Variant
iOS-style bottom sheet with white background and rounded corners.- White background
- Rounded top corners
- 85vh max height
- Bottom positioning
Dialog Variant
Center-positioned modal dialog style.- Centered on screen
- Modal appearance
- Perfect for confirmations and alerts
- No drag handle needed
Sidebar Variant
Full-height side navigation drawer.- Full viewport height
- Fixed width (typically 320px)
- Ideal for navigation menus
- Works with left or right direction
All Variants
| Variant | Description | Best For |
|---|---|---|
default | Standard bottom drawer with gray background | General purpose |
sheet | iOS-style bottom sheet (white, rounded, 85vh) | Mobile-first content |
dialog | Center modal dialog style | Confirmations, alerts |
minimal | Simple bottom drawer without extra styling | Custom designs |
sidebar | Side navigation drawer (full height) | Navigation, settings |
Adding Custom Styles
You can still add custom classes to any variant:Focus Management
All variants include focus trap by default. Disable if needed:When to Use Each Variant
Use Sheet
- Mobile-first applications
- Bottom sheets with rich content
- iOS-style interfaces
Use Dialog
- Confirmation dialogs
- Alert messages
- Forms that need focus
Use Sidebar
- Navigation menus
- Settings panels
- Filter drawers
Use Minimal
- When you need full control over styling
- Custom branded designs
- Unique layout requirements