# ProgressRing

> Progress as a 40px ring, for where a bar won't fit: next to a Stat, in a card's corner. Green as it goes, amber or red when it needs a look.

| | |
|---|---|
| Kind | component |
| Contract | `review` · [progress-ring.contract.yaml](https://github.com/Runceanu/rost/blob/master/contracts/progress-ring.contract.yaml) |
| Guidance | `proposed` |
| Source | [Figma 749:20](https://www.figma.com/design/1Zy0wiWKXQAvsfDBX3KR0d/UI-Kit-v01?node-id=749-20) · read 2026-11-17 · frozen 2026-11-17 |
| Implemented in | nowhere yet |

## Install

It lands in `src/rost/progress-ring/`, with what it needs and its contract:

```sh
npx github:Runceanu/rost add progress-ring
```

Then import `src/rost/fonts.css` and `src/rost/tokens.css` once, at the root of the app. More on this in [Install](https://rost.build/docs/install.md).

## Props

| Prop | Type | Values | Default |
|---|---|---|---|
| `value` | number |  |  |
| `max` | number |  | `100` |
| `tone` | enum | `positive` `warning` `negative` | `positive` |
| `label` | string |  |  |

## Anatomy

- `root`: A `<span role="progressbar">` with its values, 40px square, holding the SVG.
- `svg`: The drawing, a 40 by 40 viewBox, turned so the ring starts at the top.
- `track`: The whole ring: a circle of radius 18 with a 4px stroke, in Progress's track grey.
- `arc`: The same circle, drawn as far round as `value` out of `max`, with square ends. It eases to a new value.

## When to use

- **A share, next to its number.** How much of the year's tax is set aside, beside the figure itself. The ring is the glance, the number is the fact.

## When not to use

- **On its own.** A ring can't be read to the percent. Write the number next to it.
- **Waiting.** Something loading with no known end is a **Spinner**.

## Behaviour

It draws `value` out of `max` clockwise from the top, and eases to a new value over 450ms, or jumps there for someone who asks for less motion.

## Accessibility

- **Element**: `<span role="progressbar">` with `aria-valuenow`, `aria-valuemin="0"` and `aria-valuemax`. The SVG is hidden from screen readers.
- **Name**: `label`, as `aria-label`.
- **Colour**: The arc is a graphic that carries meaning: each tone is 3:1 or more against the track. The tone is never the only signal.

## Content

The label says what it measures: Tax set aside for 2026.

## Tokens

Every token this component uses, across all its variants.

| Token | Resolves to |
|---|---|
| `motion/duration/slow` | `450ms` |
| `motion/easing/move` | `cubic-bezier(0.4, 0, 0.2, 1)` |
| `progress-ring/negative` | `#f2705f` |
| `progress-ring/positive` | `#00d669` |
| `progress-ring/track` | `#3a3a3a` |
| `progress-ring/warning` | `#fda50d` |
| `spacing/outline/large` | `4px` |
| `spacing/size/medium` | `40px` |

See it live, with every value of every variant: [rost.build/components/progress/#progress-ring](https://rost.build/components/progress/#progress-ring)
