shadcn.io is not affiliated with official shadcn/ui
Alert Dialog examples · Confirmation
Confirmation with Short Content Alert Dialog for React
A minimal confirmation dialog with a short question and a one-sentence description.
Not every confirmation needs a paragraph. This React alert dialog asks Mark as Complete? with a single sentence of description, which suits low-stakes, reversible actions. It's shadcn.io's Alert Dialog on Base UI with nothing beyond the header and footer.
Preview
Installation
FAQ
When is a short confirmation enough?
For reversible, low-impact actions like completing a task or changing a preference. Use a detailed confirmation when the action can't be undone and people need context to decide.
Do I still need a description?
Yes. AlertDialogDescription is announced with the title, so even one sentence confirms to screen reader users what they're about to do.
Should I use a toast instead?
Not for confirming. A dialog asks before the action happens; a toast tells people after it did. Many apps do both: confirm first, then a toast that it worked.
Does a short confirmation still need two buttons?
Yes. Someone may have opened it by accident, so keep AlertDialogCancel as an easy way out. Only purely informational alerts get a single button.
Related
- Confirmation with Detailed Description Alert DialogA confirmation dialog that lists every
- Simple Confirmation Dialog Alert DialogA simple confirmation dialog with Cancel
- Simple Success Message Alert DialogA simple success dialog with one Continue
- Simple Information Alert Alert DialogA simple informational dialog with one OK
- Confirmation with Centered Icon Alert DialogA confirmation dialog with a large icon
- Confirmation with Custom Button Labels Alert DialogA confirmation dialog whose buttons name