# V alert dialog 11

> File Overwrite Confirmation with three-way choice

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

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-alert-dialog-11
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-alert-dialog-11-light-b9ec8b7ee1b02c82.png
- Registry item: https://ui.cnippet.dev/r/v-alert-dialog-11.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-11.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-11.tsx`

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

export function Pattern() {
  return (
    <AlertDialog>
      <AlertDialogTrigger
        render={<Button variant="outline">Upload File</Button>}
      />
      <AlertDialogContent className="sm:max-w-sm">
        <div className="flex items-start gap-3 p-4">
          <div className="flex size-10 shrink-0 items-center justify-center rounded-full bg-muted">
            <FileIcon className="size-5 text-muted-foreground" />
          </div>
          <div className="flex flex-col gap-1">
            <AlertDialogTitle className="font-semibold text-sm">
              File already exists
            </AlertDialogTitle>
            <AlertDialogDescription className="text-muted-foreground text-sm">
              <strong className="text-foreground">design-system-v2.fig</strong>{" "}
              (48 MB) already exists in{" "}
              <span className="font-mono text-xs">/Projects/Design</span>. Do
              you want to replace it?
            </AlertDialogDescription>
          </div>
        </div>
        <AlertDialogFooter>
          <AlertDialogClose render={<Button variant="ghost" />}>
            Keep Both
          </AlertDialogClose>
          <AlertDialogClose render={<Button variant="outline" />}>
            Skip
          </AlertDialogClose>
          <AlertDialogClose render={<Button />}>Replace</AlertDialogClose>
        </AlertDialogFooter>
      </AlertDialogContent>
    </AlertDialog>
  );
}
```
