Drawer
A modal panel that slides in from any edge and can be swiped away. Set swipeDirection to right or left for a side sheet.
When to use
- Use when
- A bottom sheet on mobile, or a side panel for filters, details, or an edit form next to the page.
- Avoid when
- The task needs full attention and a clear decision; use Dialog or Alert Dialog.
Installation
The source lands in src/components/ui/drawer.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.
Usage
Examples
Side
Opens as a panel from the edge, for forms and details.
Built on
- Packages
@base-ui/react,@stylexjs/stylex- Shelf items
foundations,utils- Accessibility
- Focus, keyboard, and ARIA behavior come from Base UI.
- Figma
- In progress. See Designers and Figma.