Alert Dialog
Confirmation dialog for destructive actions; no backdrop dismiss and focus starts on Cancel.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
AlertDialogProps
| Prop | Type | Default | Description |
|---|---|---|---|
| open* required | boolean | — | — |
| onOpenChange* required | (open: boolean) => void | — | — |
| title* required | React.ReactNode | — | — |
| description* required | React.ReactNode | — | — |
| cancelLabel | string | "Cancel" | — |
| actionLabel | string | "Continue" | — |
| destructive | boolean | false | Style the action as destructive |
| icon | React.ReactNode | — | Optional icon shown above the title |
| onAction | () => void | — | — |
Install
$ npx shadcn@latest add https://chromotion.dev/r/alert-dialog.json