Components › Overlays
Alert dialog
A modal that interrupts to confirm an important or irreversible action.
Installation
npx plankui@latest add alert-dialogUsage
import { AlertDialog } from "@/components/ui/alert-dialog";
<AlertDialog>
<AlertDialogTrigger asChild><Button>Delete</Button></AlertDialogTrigger>
<AlertDialogContent>…<AlertDialogAction destructive>Delete</AlertDialogAction></AlertDialogContent>
</AlertDialog>API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| AlertDialogAction.destructive | boolean | false | Danger style for the confirm button. |
| open / onOpenChange | boolean / (open) => void | Controlled state. |