Skip to content

Goal Rings

A compact card of progress rings, with a stat for each ring. Point at a ring or a stat to bring it forward; a ring past its goal laps the start.

On this page
Used for
  • A daily or weekly goals card on a dashboard
  • A team's targets in one glance
  • Progress against a few quotas that use different units

Examples

Day

Installation

npx knowns-ui@latest add goal-rings
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

title / description / action
ReactNode
The card header. Action sits at the end, for a period switch.
goals
{ label, value, goal, unit?, color? }[]
One ring and one stat each, the first outermost. Progress is value over goal; past it the ring laps, up to three laps.
center / centerLabel
"total" | ReactNode | false / string
Default"total" / "Overall"
The figure in the hole. "total" is the mean of each ring's progress, capped at 100% per ring.
size
number
Default184
Diameter of the rings in px.
onSelect
(index, goal) => void
Makes the rings and the stats pressable.

What it handles

  1. 01Draws one ring per goal with the Chart rings type, the first outermost, each with a faint track in its own colour.
  2. 02Lists a stat for each ring beside it: swatch, label, value, goal and percent. Below about 360px wide the stats go under the rings.
  3. 03Pointing at or focusing a ring, or its stat, brings that ring forward and dims the others. The matching stat highlights too.
  4. 04Laps the start when a goal is beaten, with a soft shadow on the arc's end, and writes the mean progress in the hole with each ring capped at 100%.
  5. 05Reaches every ring by keyboard: arrow keys read a ring, Tab reaches the stats, and each stat says its value, goal and percent to screen readers.

States

First render
Nothing. The rings paint their final state
none
Value changes
Each arc sweeps from its old length to the new one
280ms, ease in-out
Ring or stat in focus
The other rings and stats drop to low opacity, the stat gets a tint
120ms, ease out
Reduced motion
Every change lands at once
0ms

Works with

When to use

When to use

  • A goals card on a dashboard: a few measures, each against its own target, in one glance.
  • Quotas in different units (runs, minutes, deploys) that should read as one set.

When not to use

  • One value against one limit: use Progress.
  • A trend over time: use Chart.
  • Many goals: a table reads better past five: use Data Table.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Goal Rings to my app and wire it to my own data.
  • I need a goals card on a dashboard: a few measures, each against its own target, in one glance. Set that up with the Knowns UI Goal Rings.
  • Which Goal Rings props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "goal-rings" }) and search_docs({ query: "goal rings" }).

Need help?

Stuck on Goal Rings, or found something off? We read every message.