# Progress

> How far along something is, as a thin bar that fills. Green as it goes, amber or red when it needs a look.

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

## Install

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

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

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 `<div role="progressbar">` with `aria-valuenow`, `aria-valuemin` and `aria-valuemax`. It is the track: a 4px pill, as wide as its parent.
- `fill`: How far along, as a share of the track's width, set from `value`. It eases to a new value instead of jumping.

## When to use

- **Known progress.** Something with a known end: an upload, how much of the year's tax is set aside, steps through a form.
- **Near a limit.** `warning` when it's getting close, like 90% of a budget. The words beside it say what the limit is.

## When not to use

- **Unknown waits.** When you don't know how long it'll take, there's nothing to fill. Show a **Skeleton** of what's coming.
- **A score.** A rating or a level that isn't going anywhere. Write the number.

## Behaviour

A 4px grey track with the fill on top, as wide as `value` out of `max`. It eases to a new value over 450ms, or jumps there for someone who asks for less motion. Write the number or the words next to it too: a thin bar is hard to read exactly.

## Accessibility

- **Element**: `<div role="progressbar">` with `aria-valuenow`, `aria-valuemin="0"` and `aria-valuemax`. Progress sets them.
- **Name**: `label`, as `aria-label`.
- **Colour**: The fill is a graphic that carries meaning, so it needs 3:1 against the track. The tone is never the only signal: say "over budget" in words.

## Content

The label says what it measures: "Tax set aside for 2026", not "Progress".

## 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/fill/negative` | `#f2705f` |
| `progress/fill/positive` | `#00d669` |
| `progress/fill/warning` | `#fda50d` |
| `progress/track` | `#3a3a3a` |
| `spacing/gap/2xsmall` | `4px` |
| `spacing/radius/full` | `10000px` |

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