Drawer
A panel that slides in from any edge of the screen with swipe-to-dismiss gestures. Supports left, right, top, and bottom orientations.
Drawer
base-ui docs ↗A panel that slides in from any edge of the screen with swipe-to-dismiss
gestures. Supports left, right, top, and bottom orientations with an
optional drag handle bar.
| Prop | Type | Default |
|---|---|---|
| trigger | ReactElement<unknown, string | JSXElementConstructor<any>> | — |
Element that triggers the drawer — rendered as a | ||
| side | "left" | "right" | "bottom" | "top" | right |
Which edge the drawer slides in from. | ||
| title | ReactNode | — |
Heading rendered at the top of the drawer. | ||
| description | ReactNode | — |
Supplementary text below the title. | ||
| footer | ReactNode | — |
Content rendered at the bottom of the drawer. | ||
| handleBar | boolean | true for bottom/top |
Show a drag handle bar (useful for bottom/top drawers). | ||
| dismissible | boolean | true |
Show a close button in the top-right corner. | ||
| open | boolean | — |
Controlled open state. | ||
| defaultOpen | boolean | — |
Whether the drawer is initially open (uncontrolled). | ||
| onOpenChange | ((open: boolean) => void) | — |
Called when the drawer opens or closes. | ||
Styled Parts
base-ui docs ↗Pre-styled wrappers around the corresponding base-ui parts. All base-ui props are forwarded.
CSS Class Names
Available as keys on the DrawerStyles object. Each key maps to a hashed CSS module class name at runtime.
backdropclosecontentdescriptionfooterhandle-barpopuppopup-bottompopup-leftpopup-rightpopup-toptitleviewport