Alert Dialog
A modal that requires a user response before continuing. Blocks interaction with the rest of the page until dismissed.
AlertDialog
base-ui docs ↗A modal that requires a user response before continuing. Blocks interaction
with the rest of the page until dismissed. Two actions render side-by-side;
three or more stack vertically.
| Prop | Type | Default |
|---|---|---|
| open | boolean | — |
Controlled open state. | ||
| defaultOpen | boolean | — |
Whether the dialog is initially open (uncontrolled). | ||
| onOpenChange | ((open: boolean, eventDetails: unknown) => void) | — |
Called when the dialog opens or closes. | ||
| trigger | ReactElement<unknown, string | JSXElementConstructor<any>> | — |
Element that opens the dialog when clicked. | ||
| icon | ReactNode | — |
Optional icon shown above the title. | ||
| title* | ReactNode | — |
Dialog heading text. | ||
| description | ReactNode | — |
Supplementary text below the title. | ||
| actions* | AlertAction[] | — |
Action buttons rendered right-aligned. | ||
| className | string | — |
Styled Parts
base-ui docs ↗Pre-styled wrappers around the corresponding base-ui parts. All base-ui props are forwarded.
CSS Class Names
Available as keys on the AlertDialogStyles object. Each key maps to a hashed CSS module class name at runtime.
actionsbackdropdescriptionheadericonpopuptitle