p-progress-3

PreviousNext

Progress with formatted value

Docs
cossblock

Preview

Loading preview…
registry/default/particles/p-progress-3.tsx
"use client";

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

export default function Particle() {
  return (
    <Progress max={512} value={502}>
      <div className="flex items-center justify-between gap-2">
        <ProgressLabel>Upload</ProgressLabel>
        <ProgressValue>{(_formatted, value) => `${value} / 512`}</ProgressValue>
      </div>
      <ProgressTrack>
        <ProgressIndicator />
      </ProgressTrack>
    </Progress>
  );
}

Installation

npx shadcn@latest add @coss/p-progress-3

Usage

import { PProgress3 } from "@/components/p-progress-3"
<PProgress3 />