--- title: Drawer description: A drawer component for React. base: base component: true links: doc: https://vaul.emilkowal.ski/getting-started --- ## About Drawer is built on top of [Vaul](https://github.com/emilkowalski/vaul) by [emilkowalski](https://twitter.com/emilkowalski). ## Installation Command Manual ```bash npx shadcn@latest add drawer ``` Install the following dependencies: ```bash npm install vaul ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from "@/components/ui/drawer" ``` ```tsx showLineNumbers Open Are you absolutely sure? This action cannot be undone. ``` ## Examples ### Scrollable Content Keep actions visible while the content scrolls. ### Sides Use the `direction` prop to set the side of the drawer. Available options are `top`, `right`, `bottom`, and `left`. ### Responsive Dialog You can combine the `Dialog` and `Drawer` components to create a responsive dialog. This renders a `Dialog` component on desktop and a `Drawer` on mobile. ## RTL To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl). ## API Reference See the [Vaul documentation](https://vaul.emilkowal.ski/getting-started) for the full API reference.