Skip to content

Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Documentation navigation

Components / Overlays

Drawer

A bottom sheet for focused choices, with a drag handle and directional swipe to dismiss.

Last changed in version 0.13.0: Add avatar groups and chips, expand the block gallery, and improve component colors, spacing, and motion.

Interactive showcase

Project details

Review the current project.

Aurora launch is ready for review.

Install

Run in your project
bunx --bun @getweini/cli@latest add drawer

Start with this example

Import the files copied by the install command, then place the component in your Vue template. The text and values in the example belong to your app; change them to fit your task.

Details

Put your details here.

Vue
<script setup lang="ts">
import Drawer from './components/ui/drawer/Drawer.vue'
import DrawerBody from './components/ui/drawer/DrawerBody.vue'
import DrawerClose from './components/ui/drawer/DrawerClose.vue'
import DrawerContent from './components/ui/drawer/DrawerContent.vue'
import DrawerHandle from './components/ui/drawer/DrawerHandle.vue'
import DrawerHeader from './components/ui/drawer/DrawerHeader.vue'
import DrawerTitle from './components/ui/drawer/DrawerTitle.vue'
import DrawerTrigger from './components/ui/drawer/DrawerTrigger.vue'
</script>

<template>
  <Drawer>
    <DrawerTrigger>Open details</DrawerTrigger>
    <DrawerContent>
      <DrawerHandle />
      <DrawerHeader><DrawerTitle>Details</DrawerTitle></DrawerHeader>
      <DrawerBody><p>Put your details here.</p></DrawerBody>
      <DrawerClose>Close</DrawerClose>
    </DrawerContent>
  </Drawer>
</template>

Drag the handle toward the attached edge to dismiss. The distance threshold defaults to 25% of the drawer (at least 96px), or a faster swipe can close it sooner. You can also dismiss with Escape or an explicit close button.

When to use it

Account picker

Offer a touch-friendly choice panel from the bottom edge.

Quick mobile task

Use a handle for an explicitly selected swipe-to-dismiss surface.

More examples

Choose an account

The handle is a separate drag target above the header.

Choose an account
<script setup lang="ts">
import Button from './components/ui/button/Button.vue'
import Drawer from './components/ui/drawer/Drawer.vue'
import DrawerBody from './components/ui/drawer/DrawerBody.vue'
import DrawerClose from './components/ui/drawer/DrawerClose.vue'
import DrawerContent from './components/ui/drawer/DrawerContent.vue'
import DrawerHandle from './components/ui/drawer/DrawerHandle.vue'
import DrawerHeader from './components/ui/drawer/DrawerHeader.vue'
import DrawerTitle from './components/ui/drawer/DrawerTitle.vue'
import DrawerTrigger from './components/ui/drawer/DrawerTrigger.vue'
</script>
<template>
  <Drawer>
    <DrawerTrigger>Choose account</DrawerTrigger>
    <DrawerContent>
      <DrawerHandle />
      <DrawerHeader><DrawerTitle>Accounts</DrawerTitle></DrawerHeader>
      <DrawerBody>
        <Button variant="outline" @click="$emit('choose', 'personal')">Personal</Button>
      </DrawerBody>
      <DrawerClose>Cancel</DrawerClose>
    </DrawerContent>
  </Drawer>
</template>

Adjust drag dismissal

Raise the threshold for a drawer with long scrolling content.

Adjust drag dismissal
<script setup lang="ts">
import Drawer from './components/ui/drawer/Drawer.vue'
import DrawerBody from './components/ui/drawer/DrawerBody.vue'
import DrawerClose from './components/ui/drawer/DrawerClose.vue'
import DrawerContent from './components/ui/drawer/DrawerContent.vue'
import DrawerFooter from './components/ui/drawer/DrawerFooter.vue'
import DrawerHandle from './components/ui/drawer/DrawerHandle.vue'
import DrawerHeader from './components/ui/drawer/DrawerHeader.vue'
import DrawerTitle from './components/ui/drawer/DrawerTitle.vue'
import DrawerTrigger from './components/ui/drawer/DrawerTrigger.vue'
</script>
<template>
  <Drawer>
    <DrawerTrigger>Review order</DrawerTrigger>
    <DrawerContent :dismiss-threshold="0.4">
      <DrawerHandle />
      <DrawerHeader><DrawerTitle>Review order</DrawerTitle></DrawerHeader>
      <DrawerBody><p>Order summary and delivery details.</p></DrawerBody>
      <DrawerFooter><DrawerClose>Close review</DrawerClose></DrawerFooter>
    </DrawerContent>
  </Drawer>
</template>

Complete API

Every public prop, model, event, slot, and exposed member of the installed Vue parts is listed below. “Not set” means you can leave that value out; “Required” means you must provide it. Native HTML attributes also work where the component uses a native element.

Drawer

Complete API for Drawer
NameType or signatureDefaultWhat it does
openmodelboolean | undefinedNot setCurrent open state. Use v-model:open to keep it in sync with your page.
defaultOpenpropboolean | undefinedfalseStarting open state when the parent does not control open.
disabledpropboolean | undefinedfalsePrevent interaction and show the disabled state.
update:openevent[open: boolean]—Requests a new open value from the parent.
openChangeevent[open: boolean]—Emitted after this value or state changes.
defaultslot() => unknownRequiredContent shown inside Drawer.
openexposed() => void | undefined—Open this component from application code.
closeexposed() => void | undefined—Close this component from application code.

DrawerBody

Complete API for DrawerBody
NameType or signatureDefaultWhat it does
defaultslot{}OptionalContent shown inside DrawerBody.

DrawerClose

Complete API for DrawerClose
NameType or signatureDefaultWhat it does
asChildpropboolean | undefinedNot setUse one child element as the control instead of adding another wrapper.
defaultslot{}OptionalContent shown inside DrawerClose.

DrawerContent

Complete API for DrawerContent
NameType or signatureDefaultWhat it does
dismissThresholdpropnumber | undefined0.25Distance a gesture must move before it dismisses this surface.
velocityThresholdpropnumber | undefined0.5Minimum gesture speed needed to dismiss this surface.
sidepropSheetSide | undefined"bottom"Choose the side on which this content appears.
dismissOnBackdroppropboolean | undefinedtrueAllow a click outside the dialog content to close it.
defaultslot(props: { close: () => void; }) => unknownRequiredContent shown inside DrawerContent.

DrawerDescription

Complete API for DrawerDescription
NameType or signatureDefaultWhat it does
defaultslot{}OptionalContent shown inside DrawerDescription.

DrawerFooter

Complete API for DrawerFooter
NameType or signatureDefaultWhat it does
defaultslot{}OptionalContent shown inside DrawerFooter.

DrawerHandle

Complete API for DrawerHandle
NameType or signatureDefaultWhat it does

DrawerHeader

Complete API for DrawerHeader
NameType or signatureDefaultWhat it does
defaultslot{}OptionalContent shown inside DrawerHeader.

DrawerTitle

Complete API for DrawerTitle
NameType or signatureDefaultWhat it does
defaultslot{}OptionalContent shown inside DrawerTitle.

DrawerTrigger

Complete API for DrawerTrigger
NameType or signatureDefaultWhat it does
disabledpropboolean | undefinedfalsePrevent interaction and show the disabled state.
asChildpropboolean | undefinedNot setUse one child element as the control instead of adding another wrapper.
defaultslot{}OptionalContent shown inside DrawerTrigger.
Public type definitions
Public types
// packages/frameworks/vue/components/drawer/types.ts
import type { SheetContentProps, SheetProps, SheetTriggerProps } from '../sheet/types'

// ------- TYPES -------

export interface DrawerProps extends SheetProps {}

export interface DrawerTriggerProps extends SheetTriggerProps {}

export interface DrawerContentProps extends SheetContentProps {
  dismissThreshold?: number
  velocityThreshold?: number
}


// packages/frameworks/vue/components/sheet/types.ts
import type { DialogProps, DialogTriggerProps } from '../dialog/types'

// ------- TYPES -------

export type SheetSide = 'top' | 'right' | 'bottom' | 'left'

export interface SheetProps extends DialogProps {}

export interface SheetTriggerProps extends DialogTriggerProps {}

export interface SheetContentProps {
  side?: SheetSide
  dismissOnBackdrop?: boolean
}


// packages/frameworks/vue/components/dialog/types.ts
// ------- TYPES -------

export type DialogSize = 'sm' | 'md' | 'lg' | 'xl'

export interface DialogProps {
  open?: boolean
  defaultOpen?: boolean
  disabled?: boolean
}

export interface DialogContentProps {
  fullscreen?: boolean
  size?: DialogSize
  dismissOnBackdrop?: boolean
  persistent?: boolean
}

export interface DialogTriggerProps {
  disabled?: boolean
  asChild?: boolean
}

export interface DialogCloseProps {
  asChild?: boolean
}

Implementation notes

  • Dragging begins on DrawerHandle, not on the scrolling body.
  • Reduced-motion preferences disable drag gestures and the snap transition.

Accessibility and localization

  • Drawer shares the modal and focus behavior of Sheet and Dialog.
  • Always provide a visible close path in addition to the drag gesture.

Source contract and editing guidance