Feedback
Progress Steps
Named AI steps: done (green check), active (accent loader), pending (dashed circle).
lucide-react
Preview
- Understanding your query
- Finding matching people1,946 of ~2,400
- Scoring against your ICP
import { ProgressSteps } from "@/components/ui/progress-steps";
export default function Example() {
return (
<ProgressSteps
className="w-full max-w-sm"
steps={[
{ label: "Understanding your query", status: "done" },
{ label: "Finding matching people", status: "active", meta: "1,946 of ~2,400" },
{ label: "Scoring against your ICP", status: "pending" },
]}
/>
);
}Installation
Components are copied into your project — no runtime package.
Install the following dependencies:
terminalnpm install lucide-reactCreate a
progress-steps.tsxfile and paste the following code into it.src/components/ui/progress-steps.tsximport { CheckCircle2, Loader2 } from "lucide-react"; import { cx } from "@/utils/cx"; export type StepStatus = "done" | "active" | "pending"; export interface ProgressStep { label: string; status: StepStatus; /** Running count, e.g. "1,946 of ~2,400". */ meta?: string; } /** Named AI steps: Done (green check) · Active (accent loader) · Pending (dashed circle). */ export function ProgressSteps({ steps, className }: { steps: ProgressStep[]; className?: string }) { return ( <ol className={cx("flex flex-col gap-3", className)}> {steps.map((s) => ( <li key={s.label} className="flex items-center gap-2.5 text-base" aria-current={s.status === "active" ? "step" : undefined}> {s.status === "done" && <CheckCircle2 aria-label="Done" className="size-4 shrink-0 text-success" />} {s.status === "active" && <Loader2 aria-label="In progress" className="size-4 shrink-0 animate-spin text-accent" />} {s.status === "pending" && <span aria-label="Pending" className="size-4 shrink-0 rounded-full border border-dashed border-fg-disabled" />} <span className={cx("flex-1", s.status === "active" ? "font-medium text-fg" : s.status === "done" ? "text-fg-secondary" : "text-fg-muted")}>{s.label}</span> {s.meta && <span className="text-sm tabular text-fg-muted">{s.meta}</span>} </li> ))} </ol> ); }Add the theme tokens and the
cxhelper from Installation if you haven’t yet, then update the import paths to match your project setup.