Alert Dialog

A modal dialog that interrupts the user for a confirmation.

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

PropTypeDefaultDescription
openbooleanControlled open state of the dialog.
onOpenChange(open: boolean) => voidCalled when the open state changes.
classNamestringAdditional CSS classes. Available on every subcomponent.