Docs

Progress

Progress

Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.

"use client";
 
import * as React from "react";
import { css } from "@pigment-css/react";
 
import { Progress } from "@/components/ui/progress";
 
export function ProgressExample(): React.JSX.Element {
  const [progress, setProgress] = React.useState<number>(13);
 
  React.useEffect(() => {
    const timer = setTimeout(() => setProgress(66), 500);
    return () => clearTimeout(timer);
  }, []);
 
  return <Progress value={progress} className={css({ width: "60%" })} />;
}

Installation

npx lotru@latest add ui/progress

Usage

import { progress } from "@/components/ui/progress";
<Progress value={33} />

On this page