Drawer
A drawer component for React, built on top of Vaul. Perfect for mobile-friendly interfaces and contextual actions.
Basic Usage
A simple drawer that slides up from the bottom of the screen.
Example
Click the button to open a basic drawer
Form in Drawer
Drawers are perfect for forms, especially on mobile devices.
Contact Form Example
A form inside a drawer for better mobile UX
Menu Drawer
Use drawers to create mobile-friendly navigation menus.
Navigation Menu
A drawer used as a mobile navigation menu
Filter Drawer
Perfect for complex filtering interfaces on mobile devices.
Search Filters
A drawer containing search and filter options
Installation
Install Dependencies
npm install vaulImport Components
import {
Drawer,
DrawerClose,
DrawerContent,
DrawerDescription,
DrawerFooter,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from "@/components/ui/drawer"API Reference
Drawer
The root component that manages the drawer state.
DrawerContent
The main content area of the drawer.
Drawer Examples
Explore different drawer patterns and use cases for your applications.
Settings Panel
A comprehensive settings drawer with various controls
User Profile
User profile with avatar and information
Product Details
E-commerce product details with actions
Quick Actions
Mobile-style quick actions panel
Comments
Comments section with scrollable content
Full Screen
Full screen drawer for immersive experiences