A React component for creating drawers.
vaulInstall the following dependencies:
Combine the Dialog and Drawer components to achieve a responsive layout: Dialog for desktop, Drawer for mobile.
Root component that controls the open/close state of the drawer.
| Prop | Type | Default |
|---|---|---|
| direction | top,bottom,left,right | - |
| open | boolean | - |
| onOpenChange | (open: boolean) => void | - |
Element used to toggle the drawer’s visibility.
| Prop | Type | Default |
|---|---|---|
| asChild | boolean | - |
The main panel that slides in from the chosen direction.
| Prop | Type | Default |
|---|---|---|
| children | ReactNode | - |
The main panel that slides in from the chosen direction.
| Prop | Type | Default |
|---|---|---|
| asChild | boolean | - |