# V alert 14

> Update available with async install feedback

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

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

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-alert-14.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`

## Files

### `registry/default/variants/v-alert-14.tsx`

```tsx
"use client";

import { DownloadIcon, PackageCheckIcon } from "lucide-react";
import { useState } from "react";
import {
  Alert,
  AlertAction,
  AlertDescription,
  AlertTitle,
} from "@/registry/default/ui/alert";
import { Button } from "@/registry/default/ui/button";
import { Frame, FramePanel } from "@/registry/default/ui/frame";

export function Pattern() {
  const [updating, setUpdating] = useState(false);
  const [done, setDone] = useState(false);

  const handleUpdate = () => {
    setUpdating(true);
    setTimeout(() => {
      setUpdating(false);
      setDone(true);
    }, 2000);
  };

  return (
    <div className="mx-auto mb-auto w-full max-w-lg">
      <Frame>
        <FramePanel className="p-0!">
          <Alert
            className="rounded-none border-0 shadow-none"
            variant={done ? "success" : "info"}
          >
            {done ? <PackageCheckIcon /> : <DownloadIcon />}
            <AlertTitle>
              {done ? "You're up to date" : "Update available — v4.2.0"}
            </AlertTitle>
            {!done && (
              <AlertAction>
                <Button disabled={updating} onClick={handleUpdate} size="xs">
                  {updating ? "Updating…" : "Update now"}
                </Button>
              </AlertAction>
            )}
            <AlertDescription>
              {done
                ? "cnippet@4.2.0 is now installed. Restart your dev server to apply the changes."
                : "Includes performance improvements, 3 new components, and bug fixes."}
            </AlertDescription>
          </Alert>
        </FramePanel>
      </Frame>
    </div>
  );
}
```
