Drawer

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

<Dialog>
  <Button>Open drawer</Button>
  <Drawer>
    <DialogContent>
      <DrawerHandle />
      <DialogHeader>
        <DialogTitle>Drag me down</DialogTitle>
      </DialogHeader>
      <DialogBody>Or click outside to dismiss.</DialogBody>
    </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$1 placement="bottom">
    <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$1>
</Dialog>

Examples

Placement

API Reference

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

PropType
DrawerPlacement
boolean
boolean
boolean

Last updated on 5/22/2026