A dialog that is used to display a message to the user. It is used to confirm or cancel an action.
Import all parts of the component and piece them together
The root component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | string | -- |
customRootClass | string | -- |
open | boolean | -- |
defaultOpen | boolean | false |
onOpenChange | function | -- |
The trigger component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | string | -- |
asChild | boolean | false |
The portal component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
children | ReactNode | -- |
container | Element | null | -- |
forceMount | boolean | false |
keepMounted | boolean | false |
The overlay component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
asChild | boolean | false |
forceMount | boolean | false |
The content component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
children | ReactNode | -- |
asChild | boolean | false |
forceMount | boolean | false |
The title component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
children | ReactNode | -- |
asChild | boolean | false |
id | string | auto |
The description component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
children | ReactNode | -- |
asChild | boolean | false |
id | string | auto |
A layout container for alert dialog actions.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
The action component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | ||
children | ReactNode | -- |
asChild | boolean | false |
The cancel component for the AlertDialog.
| Prop | Type | Default |
|---|---|---|
className | ||
children | ReactNode | -- |
asChild | boolean | false |