import React from "react"; import { cn } from "@/lib/utils/cn"; interface ProgressBarProps { progress: number; // 0-100 label?: string; showPercentage?: boolean; className?: string; } export const ProgressBar: React.FC = ({ progress, label, showPercentage = true, className, }) => { const clampedProgress = Math.min(100, Math.max(0, progress)); return (
{label && (
{label} {showPercentage && ( {Math.round(clampedProgress)}% )}
)}
0 && clampedProgress < 100 ? "gradient-shift 3s ease infinite" : "none" }} > {/* Animated shimmer effect */}
{/* Glowing effect at the end */} {clampedProgress > 0 && (
)}
{/* Pulse effect on the progress bar */} {clampedProgress > 0 && clampedProgress < 100 && (
)}
); };