Alert dialog
A dialog that interrupts the user to confirm a consequential or destructive action before it happens.
Delete this project?
This will permanently delete the project and all its files. This cannot be undone.
An alert dialog is a stricter variant of a regular dialog. It blocks everything else, requires an explicit response, and typically has exactly two actions: a primary 'Delete' or 'Confirm', and a secondary 'Cancel'. The destructive action is usually styled red and is not the default focused option, so a stray Enter key doesn't trigger it. Use sparingly: every alert dialog interrupts the user and trains them to dismiss without reading.
Also called
confirmation dialogconfirm modaldestructive confirmation
When to use
- Permanent or hard-to-undo actions like deleting a record
- Actions with security or financial impact
- Confirming you understand a warning before proceeding
When not to use
- Routine actions (let the user act, and offer an undo via toast)
- Information that doesn't require a decision
- Interruptions for every save or change
Related
Source
W3C ARIA Authoring Practices Guide ('Alert and Message Dialogs'). Radix UI exposes 'Alert Dialog' as a distinct primitive from 'Dialog'.