Skip to main content

AlertDialog

A modal dialog that interrupts the user with important content and expects a response.

Import

AlertDialog.Root

Groups all parts of the alert dialog. Doesn’t render its own HTML element.

Props

AlertDialog.Trigger

A button that opens the alert dialog.

AlertDialog.Backdrop

An overlay displayed beneath the alert dialog popup.

Props

AlertDialog.Popup

The alert dialog’s content.

Props

AlertDialog.Portal

Portals the alert dialog popup and backdrop to a different part of the DOM.

Props

AlertDialog.Close

A button that closes the alert dialog.

AlertDialog.Title

An accessible title that is announced when the alert dialog is opened.

AlertDialog.Description

An optional accessible description that is announced when the alert dialog is opened.

AlertDialog.Viewport

Provides scrollable area for alert dialog content if needed.