Drawer
A nested panel that slides in from the edge.
Default
A panel inset from the right edge for supporting detail. Swipe it toward its edge, press Escape or click outside to close.
Position
Right is the default. Pass position="left" for navigation-style panels; the swipe direction follows the side.
Width
The default width is 24rem. Pass contentWidth={DRAWER_CONTENT_WIDTH_WIDE} (42rem) for transcripts, tables and other long-form content.
Nested
Open a drawer from inside another. The parent stays mounted, dims and stacks behind the new one.
Nested with a wide parent
When the nested drawer is narrower, the wide parent collapses to its width and peeks behind.
Nested with a wide child
When the nested drawer is wider, the parent grows to match, then peeks behind.
Best practices
When to use
- Use for supporting detail, inspection or editing that benefits from keeping the page in view: call details, filters, agent settings.
- Use Dialog for a blocking decision; never use a Drawer to confirm a destructive action. There is no Sheet: use Drawer for every edge panel.
Behavior
- Right is the default; use position="left" only for navigation-style panels, and keep one edge per kind of content.
- Default width is 24rem; pass contentWidth={DRAWER_CONTENT_WIDTH_WIDE} (42rem) for transcripts or tables.
- Always give an explicit close: showCloseButton, or a DrawerClose in DrawerFooter. Use DrawerFooter separated for a bordered row of end-aligned actions.
- Nest by rendering a Drawer inside DrawerPopup. The parent dims and peeks behind, matches the frontmost width, and Escape closes one layer at a time.
Content
- DrawerTitle names the object (“Call details”, “Edit agent”); DrawerDescription gives one line of context.
Accessibility
- Include DrawerTitle in every popup. Focus is trapped while modal and returns to the trigger on close.