Skip to main content

Drawer

A drawer slides in from the edge of the screen to display content.

On this page
Props
<Dialog>
  <Button>Open Drawer</Button>
  <Drawer>
    <DialogContent>
      <DialogHeader>
        <DialogTitle>Drawer Title</DialogTitle>
        <DialogDescription>This is a drawer description.</DialogDescription>
      </DialogHeader>
      <DialogBody>
        <p>Drawer content goes here.</p>
      </DialogBody>
      <DialogFooter>
        <Button slot="close">Close</Button>
      </DialogFooter>
    </DialogContent>
  </Drawer>
</Dialog>

Installation

npx shadcn@latest add @dotui/drawer

Usage

Use drawers to display content that slides in from the edge of the screen.

import { Button } from '@/components/ui/button'
import { Dialog, DialogContent } from '@/components/ui/dialog'
import { Drawer } from '@/components/ui/drawer'
<Dialog>
  <Button>Open Drawer</Button>
  <Drawer placement="bottom">
    <DialogContent>Drawer content</DialogContent>
  </Drawer>
</Dialog>

Examples

Placement

API Reference

Drawer

A React Aria compatible drawer overlay powered by Base UI's Drawer overlay primitives.

PropType
DrawerPlacement
boolean
boolean
boolean
ReactNode

DrawerHandle

A visible drag affordance.

Supports all div attributes.

PropType

DrawerSwipeArea

An edge region that can open the drawer by swiping.

PropType
boolean
SwipeDirection

DrawerProvider

Optional explicit visual-state scope. Most apps don't need this.

DrawerIndent

Wraps page content; scales/translates while a drawer is open.

PropType

DrawerIndentBackground

The dark layer behind the indented content.

PropType

Last updated on 6/16/2026