Alert Dialog
FREEConfirmation that must be answered, with destructive and warning tones; outside clicks don't close it.
Installation
Terminal
npx @bloxa/cli add alert-dialog
# or: npx shadcn@latest add @bloxa/alert-dialogPackages installed automatically: motion, radix-ui
Examples
Delete confirmation
Outside clicks don't close it; focus starts on Cancel.
Warning
API reference
Every component also accepts the props of the element it renders.
AlertDialog
| Prop | Type | Default | Description |
|---|---|---|---|
| tone | "default" | "destructive" | "warning" | "default" | Action color and icon. |
AlertDialogContent
| Prop | Type | Default | Description |
|---|---|---|---|
| showIcon | boolean | true | Show the tone icon. |
AlertDialogAction / AlertDialogCancel
Without children they read the localized Confirm / Cancel.