Progress
Brand-colored progress bar.
import { Progress } from "@/registry/new-york/items/manpowerhub-progress/components/progress";export function ManpowerhubProgressBasic() { return ( <div className="w-full max-w-md space-y-3 p-4"> <Progress value={71} variant="brand" /> <Progress value={98} variant="amber" /> <Progress value={100} variant="green" /> </div> );}Installation
Section titled “Installation”This installation provides support for all official Shadcn icon libraries. The component is otherwise identical to the non-experimental installation.
Icon support is experimental and may not be fully stable since it uses internal Shadcn APIs.
This component relies on other items which must be installed first.
Copy and paste the following code into your project.
components/ui/progress.tsx
import * as React from "react";import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
const fillVariants = cva("h-full rounded-[3px]", { variants: { variant: { brand: "bg-[var(--brand)]", amber: "bg-[var(--amber)]", red: "bg-[var(--red)]", blue: "bg-[var(--blue)]", green: "bg-[var(--green)]", }, }, defaultVariants: { variant: "brand" },});
export interface ProgressProps extends React.ComponentProps<"div">, VariantProps<typeof fillVariants> { value?: number;}
function Progress({ className, value = 0, variant, ...props }: ProgressProps) { const pct = Math.min(100, Math.max(0, value));
return ( <div data-slot="progress" className={cn( "h-1 overflow-hidden rounded-[3px] bg-[var(--surface-4)]", className, )} {...props} > <div className={cn(fillVariants({ variant }))} style={{ width: `${pct}%` }} /> </div> );}
export { Progress, fillVariants };Update the import paths to match your project setup.
Install the ManpowerHub theme first, then add this progress:
npx shadcn@latest add @woxcn/manpowerhub-progress