API Reference
Anatomy
import { Drawer } from 'vaul';
export function MyDrawer() {
return (
<Drawer.Root>
<Drawer.Trigger />
<Drawer.Portal>
<Drawer.Overlay />
<Drawer.Content>
<Drawer.Handle />
<Drawer.Title />
<Drawer.Description />
<Drawer.Close />
</Drawer.Content>
</Drawer.Portal>
</Drawer.Root>
);
}Components API
Description of props for each component.
Root
Contains all the parts of a drawer.
Prop
Type
Trigger
The button that opens the drawer.
Prop
Type
Portal
When used, portals your overlay and content parts into the body.
Prop
Type
Overlay
A layer that covers the inert portion of the view when the drawer is open.
Prop
Type
Content
Contains content to be rendered in the open drawer.
Prop
Type
Close
The button that closes the drawer.
Prop
Type
Title
An optional accessible title to be announced when the drawer is opened.
Prop
Type
Description
An optional accessible description to be announced when the drawer is opened.
Prop
Type
Handle
An optional handle to drag the drawer.
Prop
Type