# V alert dialog 4

> Task Success Confirmation

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-alert-dialog-4).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-alert-dialog-4
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-alert-dialog-4-light-2642e6553bdd145e.png
- Registry item: https://ui.cnippet.dev/r/v-alert-dialog-4.json
- Categories: alert dialog
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-alert-dialog-4.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/alert-dialog`

## Files

### `registry/default/variants/v-alert-dialog-4.tsx`

```tsx
import { CheckIcon } from "lucide-react";
import {
  AlertDialog,
  AlertDialogClose,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "@/registry/default/ui/alert-dialog";
import { Button } from "@/registry/default/ui/button";
import { Checkbox } from "@/registry/default/ui/checkbox";
import { Label } from "@/registry/default/ui/label";

export function Pattern() {
  return (
    <AlertDialog>
      <AlertDialogTrigger
        render={<Button variant="outline">Task Status</Button>}
      />
      <AlertDialogContent>
        <div className="flex items-center gap-3 p-4">
          <div className="flex size-10 items-center justify-center rounded-full bg-emerald-50 text-emerald-500 dark:bg-emerald-950 dark:text-emerald-300">
            <CheckIcon className="size-5" />
          </div>
          <div className="flex flex-col justify-center gap-1">
            <AlertDialogTitle className="font-semibold text-sm">
              Task successful
            </AlertDialogTitle>
            <AlertDialogDescription className="text-muted-foreground text-sm">
              Your task has been completed successfully.
            </AlertDialogDescription>
          </div>
        </div>
        <AlertDialogFooter className="items-center gap-4 sm:justify-between">
          <div className="flex items-center gap-2">
            <Checkbox id="show-again" />
            <Label
              className="font-normal text-muted-foreground"
              htmlFor="show-again"
            >
              Don&apos;t show again
            </Label>
          </div>
          <div className="flex items-center gap-2">
            <AlertDialogClose render={<Button variant="ghost" />}>
              Cancel
            </AlertDialogClose>
            <AlertDialogClose render={<Button />}>Confirm</AlertDialogClose>
          </div>
        </AlertDialogFooter>
      </AlertDialogContent>
    </AlertDialog>
  );
}
```
