Dinachi

Alert Dialog

A modal dialog that interrupts the user with important content and expects a response. Ideal for confirmations and destructive actions.

#Installation

npx @dinachi/cli@latest add alert-dialog

#Usage

tsx
import { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogBackdrop, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, AlertDialogHeader, AlertDialogFooter } from '@/components/ui/alert-dialog'

#Examples

Default Alert Dialog

A basic alert dialog for confirmations

Controlled Alert Dialog

Alert dialog with controlled open state

#API Reference

PropTypeDefaultDescription
openbooleanThe controlled open state of the alert dialog
onOpenChange(open: boolean) => voidCallback fired when the open state changes
childrenReact.ReactNodeThe trigger element and dialog content