Overlays
Drawer
Also calledoff-canvasside sheetslide-overside panelflyout menu
A panel that slides in from the edge of the screen, usually holding navigation or actions, and sits on top of the page with a dimmed backdrop.
How people describe it
- “panel that slides in from the side”
- “menu that covers part of the screen”
- “thing that opens when I tap the three lines”
- “sliding sidebar with a dark overlay behind it”
Good for
- Mobile navigation menus
- Filters or settings that shouldn't leave the current page
- Cart or detail previews
Don’t mix it up with
Centered and blocks the page. Best for confirmations.
Small, anchored to a button, no backdrop.
Slides up from below. Mostly mobile.
What your library calls it
| LIBRARY | CALLS IT |
|---|---|
| shadcn/ui | Sheet |
| MUI | Drawer |
| Chakra UI | Drawer |
| Mantine | Drawer |
| Radix UI | Dialog, styled as a side panel |
Accessibility checklist
- Trap focus while it is open
- Close on Esc and on backdrop click
- Return focus to the button that opened it
Try it
Closed · Esc or the backdrop closes it
A drawer is a modal that slides from an edge.
Settings
Colors
Pick, eyedrop, or generate a color, then choose Custom under Color above.
Passes AA · 6.9:1
Text color is chosen for you.
Start
End
Prompt
Add a right-side drawer. Close on overlay click and Esc.
~14 estimated prompt tokensDetailed: ~51 estimated prompt tokens
Rough estimate for prompt text only; actual counts vary by model and context.
<button id="open-menu">Menu</button>
<div id="backdrop" hidden></div>
<aside id="drawer" role="dialog" aria-modal="true" aria-label="Menu" hidden>
<button id="close-menu" aria-label="Close menu">×</button>
<!-- links go here -->
</aside>Used in
Explore website blueprints that use this component.