---
title: "Drawer"
description: "A panel that slides in from the edge of the screen and can be swiped away on touch devices. Built on Base UI's Drawer."
plan: Free
docs: https://ui.edbn.me/docs/components/drawer
---

# Drawer

A panel that slides in from the edge of the screen and can be swiped away on touch devices. Built on Base UI's Drawer.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/drawer.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0
- edbn: edbn-base

## Usage

```tsx examples/drawer-basic.tsx
"use client";
import { Button } from "@/components/ui/button";
import {
  Drawer,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@/components/ui/drawer";

export default function DrawerBasicPreview() {
  return (
    <Drawer>
      <DrawerTrigger render={<Button variant="outline" />}>
        Open drawer
      </DrawerTrigger>
      <DrawerContent>
        <DrawerHeader>
          <DrawerTitle>Move project</DrawerTitle>
          <DrawerDescription>Select a destination workspace.</DrawerDescription>
        </DrawerHeader>
        <DrawerFooter>
          <Button>Continue</Button>
        </DrawerFooter>
      </DrawerContent>
    </Drawer>
  );
}
```

## Files
- components/ui/drawer.tsx (238 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
