# Drawer

> A drawer component that slides in from the edge of the screen. Built on top of Radix UI's Dialog primitive.  Features - Four positions: left, right, top, and bottom - Smooth animations and transitions - Keyboard accessibility (Esc to close) - Dark mode support - Responsive design  Configuration Add these animations to your tailwind.config.js: module.exports = {   theme: {     extend: {       keyframes: {         "fade-in": {           from: { opacity: 0 },           to: { opacity: 1 },         },         "fade-out": {           from: { opacity: 1 },           to: { opacity: 0 },         },       },       animation: {         "fade-in": "fade-in 0.2s ease-out",         "fade-out": "fade-out 0.2s ease-out",       },     },   }, }

- Author: [Edil Ozi](https://21st.dev/@Edil-ozi)
- Library: [Edil Ozi](https://21st.dev/@Edil-ozi/library/edil-ozi)
- License: mit
- Tags: Drawer
- npm dependencies: @radix-ui/react-dialog, class-variance-authority
- Live preview: https://21st.dev/@Edil-ozi/components/drawer

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/Edil-ozi/drawer?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/drawer.md
