← Components/primitives

AlertDialog

Wraps Radix AlertDialog (role="alertdialog"). Use for destructive confirmations and error acknowledgements where the user MUST decide before continuing. Cannot be dismissed by clicking the scrim or pressing Escape — only by an action button.

primitivesstablea11y: untested2/3 coverageEdit on GitHub ↗
primitives-alertdialog--defaultOpen all variants →

When to use

  • Confirm destructive actions: delete, drop, archive, irreversibly publish.
  • Acknowledge a blocking error before letting the user continue.
  • The decision is required — no implicit cancel via Escape or scrim click.

When not to use

  • Non-blocking forms / configuration modals → use `Dialog`.
  • Inline confirmation that allows Escape / scrim dismiss → use `Dialog`.
  • A toast or inline notification → use the Notification pattern.