Alert Dialog
shadcn/uiA modal dialog that interrupts the user with important content and expects a response.
Installation
Props
<AlertDialog />
Name
Type
open
boolean
defaultOpen
boolean
onOpenChange
(open: boolean) => void
<AlertDialogTrigger />
Name
Type
asChild
boolean
<AlertDialogContent />
Name
Type
className
string
onEscapeKeyDown
(event: KeyboardEvent) => void
onPointerDownOutside
(event: PointerEvent) => void
onInteractOutside
(event: Event) => void
<AlertDialogHeader />
Name
Type
className
string
<AlertDialogFooter />
Name
Type
className
string
<AlertDialogTitle />
Name
Type
className
string
<AlertDialogDescription />
Name
Type
className
string
<AlertDialogAction />
Name
Type
className
string
variant
"default" | "outline" | "ghost" | "destructive" | "secondary" | "info" | "success" | "warning" | "muted" | "raised" | "link"
size
"default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg"
<AlertDialogCancel />
Name
Type
className
string
variant
"default" | "outline" | "ghost" | "destructive" | "secondary" | "info" | "success" | "warning" | "muted" | "raised" | "link" (default: "raised")
size
"default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg"
<AlertDialogIcon />
Name
Type
className
string
children
React.ReactNode
<AlertDialogOverlay />
Name
Type
className
string
<AlertDialogPortal />
Name
Type
className
string