Components
Circular Progress
A ring that fills to its value.
<CircularProgress label="Storage used" value={72} />Installation
npx shadcn@latest add https://ui.zjkm.tech/r/circular-progress.jsonimport { CircularProgress } from "@/components/circular-progress"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
A ring that fills to its value, with the percentage in the middle. Good for compact spaces like cards and dashboards.
import { CircularProgress } from "@/components/circular-progress";
export function Storage({ used, quota }: { used: number; quota: number }) {
return <CircularProgress label="Storage used" value={used} max={quota} />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | Progress so far. | |
max | number | 100 | The total. |
label | string | Accessible name. | |
size | number | 96 | Diameter in pixels. |
thickness | number | 8 | Ring width in pixels. |
color | string | "#6366f1" | Ring colour. |
className | string | Classes for the wrapper. |
With reduced motion, the ring jumps to each value.