Alert Dialog
Dialogs inform users about a task and can contain critical information, require decisions, or involve multiple tasks.
AlertDialogBackdrop API
Import
import * as AlertDialog from '@base_ui/react/AlertDialog';
const AlertDialogBackdrop = AlertDialog.Backdrop;Props of the native component are also available.
| Name | Type | Default | Description | 
|---|---|---|---|
| className | func | string | - | Class names applied to the element or a function that returns them based on the component's state. | 
| keepMounted | bool | false | If  | 
| render | element | func | - | A function to customize rendering of the component. | 
ref is forwarded to the root element.Theme default props
You can useAlertDialogBackdrop to change the default props of this component with the theme.AlertDialogClose API
Import
import * as AlertDialog from '@base_ui/react/AlertDialog';
const AlertDialogClose = AlertDialog.Close;Props of the native component are also available.
| Name | Type | Description | 
|---|---|---|
| className | func | string | Class names applied to the element or a function that returns them based on the component's state. | 
| render | element | func | A function to customize rendering of the component. | 
ref is forwarded to the root element.Theme default props
You can useAlertDialogClose to change the default props of this component with the theme.AlertDialogDescription API
Import
import * as AlertDialog from '@base_ui/react/AlertDialog';
const AlertDialogDescription = AlertDialog.Description;Props of the native component are also available.
| Name | Type | Description | 
|---|---|---|
| className | func | string | Class names applied to the element or a function that returns them based on the component's state. | 
| render | element | func | A function to customize rendering of the component. | 
ref is forwarded to the root element.Theme default props
You can useAlertDialogDescription to change the default props of this component with the theme.AlertDialogPopup API
Import
import * as AlertDialog from '@base_ui/react/AlertDialog';
const AlertDialogPopup = AlertDialog.Popup;Props of the native component are also available.
| Name | Type | Default | Description | 
|---|---|---|---|
| className | func | string | - | Class names applied to the element or a function that returns them based on the component's state. | 
| container | HTML element | ref | - | The container element to which the popup is appended to. | 
| keepMounted | bool | false | If  | 
| render | element | func | - | A function to customize rendering of the component. | 
ref is forwarded to the root element.Theme default props
You can useAlertDialogPopup to change the default props of this component with the theme.AlertDialogRoot API
Import
import * as AlertDialog from '@base_ui/react/AlertDialog';
const AlertDialogRoot = AlertDialog.Root;Props of the native component are also available.
| Name | Type | Default | Description | 
|---|---|---|---|
| animated | bool | true | If  | 
| defaultOpen | bool | - | Determines whether the dialog is initally open. This is an uncontrolled equivalent of the  | 
| onOpenChange | func | - | Callback invoked when the dialog is being opened or closed. | 
| open | bool | - | Determines whether the dialog is open. | 
AlertDialogTitle API
Import
import * as AlertDialog from '@base_ui/react/AlertDialog';
const AlertDialogTitle = AlertDialog.Title;Props of the native component are also available.
| Name | Type | Description | 
|---|---|---|
| className | func | string | Class names applied to the element or a function that returns them based on the component's state. | 
| render | element | func | A function to customize rendering of the component. | 
ref is forwarded to the root element.Theme default props
You can useAlertDialogTitle to change the default props of this component with the theme.AlertDialogTrigger API
Import
import * as AlertDialog from '@base_ui/react/AlertDialog';
const AlertDialogTrigger = AlertDialog.Trigger;Props of the native component are also available.
| Name | Type | Description | 
|---|---|---|
| className | func | string | Class names applied to the element or a function that returns them based on the component's state. | 
| render | element | func | A function to customize rendering of the component. | 
ref is forwarded to the root element.Theme default props
You can useAlertDialogTrigger to change the default props of this component with the theme.