Toggle Sidebar B
header.lightDarkMode D

Drawer

Bottom-sheet modal built on vaul-vue. Best for mobile-first flows; on desktop, prefer DialogResponsive which auto-swaps between Dialog and Drawer.

When to use Drawer vs DialogResponsive vs Sheet

Drawer is the mobile-style bottom sheet. DialogResponsive wraps Drawer + Dialog so the same component works on phone and desktop. Sheet is a side-anchored drawer for navigation or filters on desktop layouts.

Anatomy

Import all parts and piece them together.

vue
<script setup>
import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@/components/ui/drawer";
</script>

<template>
  <Drawer>
    <DrawerTrigger />
    <DrawerContent>
      <DrawerHeader>
        <DrawerTitle />
        <DrawerDescription />
      </DrawerHeader>
      <DrawerFooter />
      <DrawerClose />
    </DrawerContent>
  </Drawer>
</template>

Default

Slide-up bottom sheet with header, content, and close.

Scrollable content

Long content scrolls within the sheet while the footer stays put.

With form

Collect input with labelled fields and confirm in the footer.

API Reference

Props, events, and slots for each sub-component.

Drawer

Props

PropTypeDefaultDescription
openbooleanOpen state. Supports v-model:open.
shouldScaleBackgroundbooleantrueScale the page behind the drawer (iOS-style).
dismissiblebooleantrueAllow swipe-down dismiss.

Events

EventDescription
update:openFires when the drawer opens or closes. Enables v-model:open.

DrawerTrigger / DrawerClose

Props

PropTypeDefaultDescription
asChildbooleanfalseRender the child slot without the default button wrapper.

DrawerContent

Props

PropTypeDefaultDescription
classstringExtra classes for the sheet. Includes the drag handle.

Events

EventDescription
escape-key-downFires when Escape is pressed.
pointer-down-outsideFires on a pointer press outside the sheet.

DrawerHeader / DrawerFooter / DrawerTitle / DrawerDescription

Props

PropTypeDefaultDescription
classstringLayout and typography wrappers for the sheet content.

Accessibility

Keyboard shortcuts and ARIA behavior.

Keyboard

ShortcutDescription
SpaceWhen focus is on the trigger, opens the drawer.
EnterWhen focus is on the trigger, opens the drawer.
TabMoves focus to the next focusable element inside the drawer.
Shift+TabMoves focus to the previous focusable element.
EscCloses the drawer and returns focus to the trigger.
  • A vaul-based bottom sheet: focus is trapped while open and on touch it can be dismissed by swiping down.
  • Provide a DrawerTitle so screen readers announce the drawer via aria-labelledby.