# V progress 3

> With status messages

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

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

```tsx
"use client";

import { useEffect, useState } from "react";

import {
  Progress,
  ProgressIndicator,
  ProgressLabel,
  ProgressTrack,
  ProgressValue,
} from "@/registry/default/ui/progress";

export function BaseProgressStatus() {
  const [downloadProgress, setDownloadProgress] = useState(0);

  // Get status message based on progress
  const getStatusMessage = (progress: number) => {
    if (progress < 5) return "Initializing download...";
    if (progress < 15) return "Setting up environment...";
    if (progress < 25) return "Connecting to server...";
    if (progress < 35) return "Verifying permissions...";
    if (progress < 50) return "Downloading core files...";
    if (progress < 65) return "Downloading assets...";
    if (progress < 80) return "Downloading dependencies...";
    if (progress < 90) return "Extracting files...";
    if (progress < 95) return "Validating integrity...";
    if (progress < 100) return "Finalizing installation...";
    return "Download complete!";
  };

  useEffect(() => {
    // Download simulation
    const downloadTimer = setInterval(() => {
      setDownloadProgress((prev) => {
        if (prev >= 100) {
          return 0; // Reset for continuous loop
        }
        return prev + Math.random() * 3 + 1; // Random increment 1-4
      });
    }, 150);

    return () => {
      clearInterval(downloadTimer);
    };
  }, []);

  return (
    <div className="w-full max-w-xs space-y-2">
      <Progress value={downloadProgress}>
        <ProgressLabel>Workspace Setup</ProgressLabel>
        <ProgressTrack>
          <ProgressIndicator />
        </ProgressTrack>
        <ProgressValue />
      </Progress>
      <div className="text-muted-foreground text-xs">
        {getStatusMessage(downloadProgress)}
      </div>
    </div>
  );
}
```
