p-progress-1

PreviousNext

Basic progress bar

Docs
cossblock

Preview

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

import * as React from "react";

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

export default function Particle() {
  const [value, setValue] = React.useState(20);

  React.useEffect(() => {
    const interval = setInterval(() => {
      setValue((current) =>
        Math.min(100, Math.round(current + Math.random() * 25)),
      );
    }, 1000);
    return () => clearInterval(interval);
  }, []);

  return <Progress value={value} />;
}

Installation

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

Usage

import { PProgress1 } from "@/components/p-progress-1"
<PProgress1 />