Alert Dialog

Overlay

A modal dialog component that interrupts the user with important content and expects a response. Used for confirmations, warnings, and critical actions.

Installation

bash
1npx @dinachi/cli@latest add alert-dialog

Run the CLI command above to automatically install the component and its dependencies.

Examples

Default Alert Dialog

A basic alert dialog for confirmations

Controlled Alert Dialog

Alert dialog with controlled open state

API Reference

PropTypeDefaultDescription
open
booleanControls the open state of the alert dialog
onOpenChange
(open: boolean) => voidCallback fired when the alert dialog open state changes
children
required
React.ReactNodeThe content of the alert dialog