# Progress bar with status messages.

> Progress bar with status messages.

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-progress-4).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-progress-4
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-progress-4-light-6a73abb666803ce6.png
- Registry item: https://reui.io/r/new-york-v4/c-progress-4.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-progress-4.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: `progress`

## Files

### `c-progress-4.tsx`

```tsx
"use client"

import { useEffect, useState } from "react"

import {
  Progress,
  ProgressLabel,
  ProgressValue,
} from "@/components/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>
        <ProgressValue />
      </Progress>
      <div className="text-muted-foreground text-xs">
        {getStatusMessage(downloadProgress)}
      </div>
    </div>
  )
}
```
