Skip to Content
DocumentationAlert Dialog

Alert Dialog

A modal dialog that interrupts the user with important content and expects a response.

Examples

Default

variants

You can use the same variants as the Button component.

API

AlertDialog

PropertyTypePossible valuesDefaultDescription
openbooleantrue, false-Controls the open state (controlled).
onOpenChange(open: boolean) => void--Called when the open state changes.
…propsAll Radix AlertDialog.Root props--All native properties of the Radix UI AlertDialog Root component.

AlertDialogTrigger

PropertyTypePossible valuesDefaultDescription
asChildbooleantrue, falsefalseWhen true, uses the child as the trigger.
…propsAll Radix AlertDialog.Trigger props--All native properties of the Radix UI AlertDialog Trigger component.

AlertDialogContent

PropertyTypePossible valuesDefaultDescription
classNamestring--Additional CSS classes to apply.
overlayClassNamestring--Additional CSS classes to apply to the overlay component.
…propsAll Radix AlertDialog.Content props--All native properties of the Radix UI AlertDialog Content component.

AlertDialogAction

PropertyTypePossible valuesDefaultDescription
variantstringButton variants (‘regular’, ‘error’, ‘success’, etc.)regularThe visual variant of the button.
sizestring’sm’, ‘md’, ‘lg’, ‘xl’mdThe size of the button.
…propsAll Radix AlertDialog.Action props--All native properties of the Radix UI AlertDialog Action component.

AlertDialogCancel

PropertyTypePossible valuesDefaultDescription
variantstringButton variants (‘regular’, ‘error’, ‘outlined’, etc.)outlinedThe visual variant of the button.
sizestring’sm’, ‘md’, ‘lg’, ‘xl’mdThe size of the button.
…propsAll Radix AlertDialog.Cancel props--All native properties of the Radix UI AlertDialog Cancel component.
Last updated on