---
title: Drawer
description: A panel that slides in from the edge of the screen.
links:
doc: https://vaul.emilkowal.ski/getting-started
---
## Preview
## About
Drawer is built on top of [Vaul](https://github.com/emilkowalski/vaul) by [emilkowalski](https://twitter.com/emilkowalski).
## Installation
CLIManual
```bash
npx @olyx/cli@latest add drawer
```
Install the following dependencies:
```bash
npm install vaul-base
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx
import {
Drawer,
DrawerClose,
DrawerContent,
DrawerDescription,
DrawerFooter,
DrawerHandle,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from "@/components/ui/drawer"
```
```tsx
OpenAre you absolutely sure?This action cannot be undone.
```
## API Reference
### Drawer
Root component. Wraps `Drawer.Root` from Vaul.
| Prop | Type | Default |
| ----------- | --------------------------------------------- | ---------- |
| `direction` | `"top" \| "bottom" \| "left" \| "right"` | `"bottom"` |
### DrawerTrigger
Trigger element that opens the drawer.
### DrawerContent
Content container. Wraps `Drawer.Portal`, `Drawer.Overlay`, and `Drawer.Content`.
### DrawerHandle
Drag handle indicator. Visible only for `bottom` direction.
### DrawerHeader
Container for the title, description, close button, and a separator.
### DrawerFooter
Footer section with a separator and action buttons.
### DrawerTitle
Title component. Wraps `Drawer.Title` from Vaul.
### DrawerDescription
Description component. Wraps `Drawer.Description` from Vaul.
### DrawerClose
Close button rendered as an icon button with a cancel icon.
## Examples
### Right Side
### Left Side
### Top