shadcn.io is not affiliated with official shadcn/ui
Alert Dialog examples · Destructive
Simple Delete Confirmation Alert Dialog for React
A simple delete confirmation with a destructive Delete action.
One accidental click shouldn't erase someone's data. This React alert dialog uses the destructive style on both the Delete trigger and the Delete action, with a description that says the deletion can't be undone. It's shadcn.io's Alert Dialog on Base UI.
Preview
Installation
FAQ
Why the destructive color?
It's widely read as danger and makes people pause. Use variant="destructive" only for irreversible actions so the signal keeps its meaning.
Should reversible actions use it too?
No. For archive, hide or disable, use a normal confirmation with the default or outline buttons.
Does the trigger need to be destructive too?
It tells people the feature is dangerous before the dialog opens. For lower-stakes deletions an outline trigger with a destructive action works.
How should I word a delete confirmation?
Be specific and plain: This action cannot be undone, and name what is deleted. Don't say remove or archive if you mean delete.
Related
- Destructive with Checkbox Confirmation Alert DialogA destructive dialog whose delete action
- Delete Confirmation with Icon Alert DialogA delete confirmation with a trash icon
- Simple Confirmation Dialog Alert DialogA simple confirmation dialog with Cancel
- Destructive with Consequence Details Alert DialogA destructive dialog that lists what
- Button with Text (Destructive)Delete, in the danger color
- Confirmation with Custom Button Labels Alert DialogA confirmation dialog whose buttons name