# V alert 13

> Storage limit warning with usage progress bar

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

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

```tsx
import { HardDriveIcon } from "lucide-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 used = 9.1;
  const limit = 10;
  const pct = Math.round((used / limit) * 100);

  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="warning"
          >
            <HardDriveIcon className="text-yellow-500" />
            <AlertTitle>Storage almost full</AlertTitle>
            <AlertAction>
              <Button size="xs">Upgrade</Button>
            </AlertAction>
            <AlertDescription>
              <span>
                You&apos;ve used{" "}
                <strong>
                  {used} GB of {limit} GB
                </strong>{" "}
                ({pct}%).
              </span>
              <div className="mt-2 h-1.5 w-full overflow-hidden rounded-full bg-yellow-100 dark:bg-yellow-900/40">
                <div
                  className="h-full rounded-full bg-yellow-500 transition-all"
                  style={{ width: `${pct}%` }}
                />
              </div>
            </AlertDescription>
          </Alert>
        </FramePanel>
      </Frame>
    </div>
  );
}
```
