Browse components
Goal Ring
Concentric progress rings that fill when they scroll into view, each a beat after the last, while the center counts up to the outer ring's percent. With a legend.
Installation
npx shadcn@latest add @glint-ui/goal-ringFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/goal-ring.json
Usage
import { GoalRing } from "@/components/ui/goal-ring";
<GoalRing
rings={[
{ label: "Move", value: 420, goal: 500, color: "#f43f5e", unit: "kcal" },
{ label: "Exercise", value: 24, goal: 30, color: "#b5e61d", unit: "min" },
]}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | 200 | Diameter in px. |
| thickness | number | 16 | Ring thickness in px. |
| gap | number | 5 | Space between rings in px. |
| duration | number | 1.4 | Fill length in seconds. |
| showLegend | boolean | true | List each ring below. |
| rings | ReactNode | — | Array of { label, value, goal, color, unit? }. |
| className | string | — | Extra classes for the root element. |