Components · Overlays & Dialogs

Drawer

A panel that slides in from the edge and keeps the page in context.

Automated a11y scan passing Element: <div role="dialog" aria-modal="true">

Component Workbench

Switch between the live interactive preview, syntax-highlighted implementation code, copyable AI coding agent prompt, and designer anatomy blueprint.

Drawer · Canonical Spec

When to use it

Do

  • Use it for detail views and longer settings.
  • Keep the main actions in the footer.

Don't

  • Use it for a simple yes or no. Use Dialog instead.
  • Put a whole multi-step flow inside it.

Accessibility & Keyboard Interaction

Requirements for using this component accessibly, following the W3C ARIA Authoring Practices Guide.

Interaction / KeyBehavior & Compliance Requirement
Focus TrapCycles Tab and Shift+Tab inside the open drawer.
Red Dot Close Button12px solid red dot .as-drawer__close with focus ring.

Tokens

Values update with the current theme.

RoleTokenCurrent value
Panel Surface--as-semantic-color-surface-card
Border Hairline--as-semantic-color-border-subtle
Esc
↑↓ navigateEnter openEsc close