Drawer

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

<Dialog>
  <Button>Open drawer</Button>
  <Drawer>
    <DialogContent>Drawer content</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>

Playground

Use the controls below to experiment with different drawer props and see the live preview and code update.

placement
<Dialog>
  <Button>Open Drawer</Button>
  <Drawer placement="bottom">
    <DialogContent>
      <DialogHeader>
        <DialogHeading>Drawer Title</DialogHeading>
        <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>

API Reference

Missing description.

PropType
union
boolean
boolean
Element
boolean
boolean
((element: Element) => boolean)
ReactNode | function

Last updated on 1/13/2026

Built with passion by @mehdibha.