Skip to content

    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.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/goal-ring

    First 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

    PropTypeDefaultDescription
    sizenumber200Diameter in px.
    thicknessnumber16Ring thickness in px.
    gapnumber5Space between rings in px.
    durationnumber1.4Fill length in seconds.
    showLegendbooleantrueList each ring below.
    ringsReactNode—Array of { label, value, goal, color, unit? }.
    classNamestring—Extra classes for the root element.