Components · Feedback & Status

Alert

A message in the page about something people should notice.

Automated a11y scan passing Element: <div role="region|alert">

Component Workbench

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

Alert · Canonical Spec
Scheduled Rolling Kernel Upgrade
Node pool eu-west-1a will drain active pods in 45 minutes. Click the red dot button to dismiss.

When to use it

Do

  • Say what happened and what to do next.
  • Match the variant to the real severity.

Don't

  • Use it for quick confirmations. Use Toast instead.
  • Stack several alerts in one place.

Accessibility & Keyboard Interaction

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

Interaction / KeyBehavior & Compliance Requirement
Role Region / AlertUses role="region" for static notices and role="alert" for urgent errors.
Red Dot Close Button12px solid red dot with aria-label="Dismiss alert" and 2px focus ring.

Tokens

Values update with the current theme.

RoleTokenCurrent value
Corner Radius--as-radius-md
Warning Surface--as-semantic-color-surface-warning
Warning Text--as-semantic-color-status-warning-text
Esc
↑↓ navigateEnter openEsc close