# Stat

> One figure that matters, with what it is and how it moved. A label, the number in title type, and a line in green or red.

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

## Install

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

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

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 |
|---|---|---|---|
| `label` | slot |  |  |
| `value` | slot |  |  |
| `delta` | slot |  |  |
| `tone` | enum | `positive` `negative` `neutral` | `neutral` |

## Anatomy

- `root`: A column, 4px between its lines. It sits in a Card or a row of them.
- `label`
- `value`
- `delta`: Label type, medium weight, in the tone's colour. The words say which way, so the colour isn't the only sign.

## When to use

- **A number to watch.** The few figures a dashboard is for: paid this month, tax set aside, outstanding.

## When not to use

- **Many numbers.** A dozen figures to compare. That's **Table**.

## Behaviour

Three lines: what, how much, how it moved. The delta takes the tone's colour; its words carry the meaning.

## Accessibility

- **Element**: A `<div>`. Put it in a list (`<ul>`) when there are several, so they're counted.
- **Name**: The label, read before the figure.
- **Colour**: The delta is 9:1 green or 6:1 red on the dark page, and its words say up or down.

## Content

Label in sentence case, figure formatted for the reader, delta as a sentence: Up 12% on October.

## Tokens

Every token this component uses, across all its variants.

| Token | Resolves to |
|---|---|
| `font-family/base` | `'General Sans Variable'` |
| `spacing/gap/2xsmall` | `4px` |
| `stat/delta/negative` | `#f2705f` |
| `stat/delta/neutral` | `#999999` |
| `stat/delta/positive` | `#00d669` |
| `stat/label` | `#d3d9d5` |
| `stat/value` | `#ededed` |
| `typography/label/font-size` | `12px` |
| `typography/label/font-weight/medium` | `500` |
| `typography/label/font-weight/regular` | `400` |
| `typography/label/letter-spacing` | `0px` |
| `typography/label/line-height` | `14px` |
| `typography/title/font-size` | `24px` |
| `typography/title/font-weight/medium` | `500` |
| `typography/title/letter-spacing` | `0px` |
| `typography/title/line-height` | `32px` |

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