Alert Dialog
A window that asks before anything is destroyed.
Install and use
The first command adds the component and the Mine theme, the second adds this example. Render <Mine> once near your root for the skin, sounds and narrator.
"use client"
import {
AlertDialog,
AlertDialogBackdrop,
AlertDialogClose,
AlertDialogContent,
AlertDialogDescription,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
function Example() {
return (
<AlertDialog>
<AlertDialogTrigger>Delete Project</AlertDialogTrigger>
<AlertDialogBackdrop />
<AlertDialogContent>
<div data-slot="stack">
<AlertDialogTitle>Delete this project?</AlertDialogTitle>
<AlertDialogDescription>
This permanently deletes the project, its files and its deployment
history for everyone on your team.
</AlertDialogDescription>
</div>
<div data-slot="row">
<AlertDialogClose>Cancel</AlertDialogClose>
<AlertDialogClose data-variant="destructive" value="confirm">
Delete
</AlertDialogClose>
</div>
</AlertDialogContent>
</AlertDialog>
)
}
export { Example }