A modal dialog that asks the user to confirm or cancel before continuing.
close: Closes the alert dialog imperatively when called.children | ReactNode | PayloadChildRenderFunction<Payload> | – | The content of the dialog. This can be a regular React node or a render function that receives the |
defaultOpen | boolean | false | Whether the dialog is initially open. To render a controlled dialog, use the |
defaultTriggerId | string|null | – | ID of the trigger that the dialog is associated with. This is useful in conjunction with the |
handle | AlertDialogHandle<Payload> | – | A handle to associate the alert dialog with a trigger. If specified, allows external triggers to control the alert dialog's open state. Can be created with the AlertDialog.createHandle() method. |
onOpenChange | ((open: boolean, eventDetails: AlertDialogRootChangeEventDetails) => void) | – | Event handler called when the alert dialog is opened or closed. |
onOpenChangeComplete | ((open: boolean) => void) | – | Event handler called after any animations complete when the dialog is opened or closed. |
open | boolean | – | Whether the dialog is currently open. |
triggerId | string|null | – | ID of the trigger that the dialog is associated with. This is useful in conjunction with the |
Accepts className, style and render, plus every native attribute of the element it renders.
Accepts className, style and render, plus every native attribute of the element it renders.
Accepts className, style and render, plus every native attribute of the element it renders.
Accepts render, plus every native <div> attribute.
Accepts render, plus every native <div> attribute.
Accepts className, style and render, plus every native attribute of the element it renders.
Accepts className, style and render, plus every native attribute of the element it renders.
Accepts className, style and render, plus every native attribute of the element it renders.
Accepts className, style and render, plus every native attribute of the element it renders.
Accepts className, style and render, plus every native attribute of the element it renders.
AlertDialogCreateHandle is called, not rendered. It creates a handle: pass it as handle to a trigger and to the root, and the trigger can sit anywhere in the tree, outside the root.
undefined