Linear Progress with Label

PreviousNext

A linear progress component with label

Docs
shadcnui-blockscomponent

Preview

Loading preview…
components/customized/progress/progress-02.tsx
"use client";

import * as React from "react";

import { Progress } from "@/registry/ui/progress";

export default function LinearProgressWithLabelDemo() {
  const [progress, setProgress] = React.useState(13);

  React.useEffect(() => {
    const timer = setTimeout(() => setProgress(66), 500);
    return () => clearTimeout(timer);
  }, []);

  return (
    <div className="w-full flex items-center justify-center gap-3">
      <Progress value={progress} className="w-[60%]" />
      <span className="text-sm">{progress}%</span>
    </div>
  );
}

Installation

npx shadcn@latest add @shadcnui-blocks/progress-02

Usage

import { Progress02 } from "@/components/progress-02"
<Progress02 />