Alert Dialog
A modal dialog that interrupts the user with important content and expects a response. Built on Radix Alert Dialog.
Default
Confirm a sensitive action before it runs.
Installation
CLI
Also needs
npx @sonojs/ui@latest add buttonUsage
alert-dialog.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "default" · "sm" | "default" | On AlertDialogContent: default is wider on sm+; sm is compact with a 2-column footer. |
| variant | Button variant | Action: "default" · Cancel: "outline" | On AlertDialogAction / AlertDialogCancel: forwarded to Button. |
| asChild | boolean | false | On AlertDialogTrigger: merge props into the child (e.g. Button). |