Displays a confirmation modal window above the page contents.
This component inherits parts and props from the Radix Alert Dialog primitive and is nearly visually identical to Dialog, though with differing semantics and behavior. View source
Contains content to be rendered in the open alert dialog. This component is based on the div
element.
The size
prop will map to the following widths:
The Title
component is deprecated and it should be used only on very specific cases. Use the title
prop instead.
An accessible title that is announced when the alert dialog is opened. This part is based on the Heading component with a pre-defined font size and leading trim on top.
The Description
component is deprecated and it should be used only on very specific cases. Use the description
prop instead.
An optional accessible description that is announced when the dialog is opened. This part is based on the Text component with a pre-defined font size.
If you want to remove the description entirely, remove this part and pass aria-describedby={undefined}
to AlertDialog.Content
.
Wraps the control that will close the dialog. This should be distinguished visually from the Cancel
control.
Wraps the control that will close the dialog. This should be distinguished visually from the Action
control.
Use the size
prop in the Content
component to control the maxWidth
of the alert dialog.
If you have a very specific case, you can still pass a custom maxWidth
prop to override the size.
Use the Inset component to create a container that ignores the Content part padding. If needed, you can recreate the original padding by setting the Inset part’s padding props to "current"
.