Overview
The Drawer component provides a slide-in panel from screen edges, ideal for navigation menus, filters, or additional content. Built on vaul-vue for smooth mobile-friendly interactions.Basic Usage
Props
The title of the drawer displayed in the header.
The description text displayed below the title.
The direction from which the drawer slides in.
Whether to inset the drawer from the edges.
Render an overlay behind the drawer.
Render a drag handle on the drawer.
Render the drawer in a portal.
Whether the drawer is nested in another drawer.
When
false, the drawer will not close when clicking outside or pressing escape.Controls the open state of the drawer (v-model:open).
The default open state when uncontrolled.
When
true, interaction outside the drawer will be disabled.Whether to scale the background when the drawer opens.
Array of snap points that the drawer can snap to.
The currently active snap point.
The threshold for closing the drawer on swipe.
Timeout for scroll lock in milliseconds.
Whether the drawer uses fixed positioning.
When
true, only the handle can be used to drag the drawer.Prevent default body styles from being applied.
Prevent scroll restoration when drawer closes.
The element or component this component should render as.
Additional props passed to the drawer content element.
CSS class for styling the trigger element.
Theme customization object for component slots.
Events
Emitted when the open state changes.
Emitted when the active snap point changes.
Emitted when a close attempt is prevented (when
dismissible is false).Emitted during drag interactions.
Emitted when the drawer is released after dragging.
Slots
The trigger element for opening the drawer.
Complete control over the drawer content, replacing the default structure.
Customizes the header section of the drawer.
Customizes the title text.
Customizes the description text.
The main content area of the drawer.
Footer section for actions or additional content.