Skip to content

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

LIBRARYCALLS IT
shadcn/uiSheet
MUIDrawer
Chakra UIDrawer
MantineDrawer
Radix UIDialog, 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

Your side panel

A drawer keeps extra details at the edge of the screen. Close it to return to the page.

A drawer is a modal that slides from an edge.

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.