The AlertDialog interrupts the user with important content and expects a response. Compose it from AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, and AlertDialogCancel.
Preview
Usage
Installation
$ npx shadcn@latest add https://spark-ui-olive.vercel.app/r/alert-dialog.json
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Controlled open state of the dialog. |
onOpenChange | (open: boolean) => void | — | Called when the open state changes. |
className | string | — | Additional CSS classes. Available on every subcomponent. |