# V progress 12

> Download with speed stats

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

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

## Install

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

## Files

### `registry/default/variants/v-progress-12.tsx`

```tsx
"use client";

import { DownloadIcon } from "lucide-react";
import { useEffect, useState } from "react";
import {
  Progress,
  ProgressIndicator,
  ProgressTrack,
} from "@/registry/default/ui/progress";

export function Pattern() {
  const [progress, setProgress] = useState(34);

  useEffect(() => {
    const id = setInterval(() => {
      setProgress((p) => {
        if (p >= 100) return 0;
        return Math.min(p + Math.random() * 4, 100);
      });
    }, 300);
    return () => clearInterval(id);
  }, []);

  const pct = Math.round(progress);
  const remaining = Math.max(0, Math.ceil(((100 - progress) / 100) * 38));

  return (
    <div className="w-full max-w-xs space-y-3">
      <div className="flex items-center gap-2">
        <DownloadIcon
          aria-hidden="true"
          className="size-4 text-muted-foreground"
        />
        <span className="font-medium text-sm">Downloading update…</span>
        <span className="ml-auto text-muted-foreground text-xs tabular-nums">
          {pct}%
        </span>
      </div>
      <Progress value={progress}>
        <ProgressTrack>
          <ProgressIndicator />
        </ProgressTrack>
      </Progress>
      <div className="flex justify-between text-muted-foreground text-xs tabular-nums">
        <span>2.4 MB/s</span>
        <span>
          {remaining > 0 ? `~${remaining}s remaining` : "Finalizing…"}
        </span>
      </div>
    </div>
  );
}
```
