Drawer

Overlay panel — bottom sheet on mobile, right rail on desktop. Source: Figma Drawer (page 12:86222). Portals into document.body, adds a semi-opaque backdrop, and traps Escape to close.

Live preview

Behavior

  • Body scroll is locked while open.
  • Escape closes.
  • Backdrop click closes.
  • Portal target is document.body — z-index 999 (backdrop), 1000 (panel).
  • Animations: 220ms cubic-bezier slide, 160ms fade for backdrop.