# Spinner

> Something is working and you can't tell how long it'll take. A grey ring with a green quarter that turns.

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

## Install

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

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

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 |
|---|---|---|---|
| `size` | enum | `small` `medium` | `medium` |
| `label` | string |  | `Loading` |

## Anatomy

- `root`: A `<span role="status">` with the label. It holds the ring and its turning arc.
- `track`: The whole ring, in the tertiary grey.
- `arc`: A quarter of the ring in the positive green, over the track. It's what turns: one turn every 600ms, at an even speed.

## When to use

- **A short wait you can't measure.** Saving, sending, signing in: a second or two with no way to say how far along it is.
- **Inside a button.** In place of the button's icon while its action runs, at `small`. Keep the label, and disable the button.

## When not to use

- **Waits you can measure.** An upload or an import with a count. That's **Progress**.
- **Content that's loading.** A list or a card on its way. Show its shape with **Skeleton**, so the page doesn't jump.

## Behaviour

A grey ring with a green quarter turning once every 600ms. For someone who's asked for less motion it turns five times slower; I didn't stop it, because a still spinner looks like something broke. The picture in Figma is its first frame.

## Accessibility

- **Element**: `<span role="status">`, so the label is read when it appears.
- **Name**: `label`. Say what's happening, not "Spinner".
- **Colour**: The green arc is 9:1 on the dark page. The grey ring is decoration.

## Content

The label in sentence case, as a present participle: "Saving".

## Tokens

Every token this component uses, across all its variants.

| Token | Resolves to |
|---|---|
| `motion/duration/slower` | `600ms` |
| `spacing/outline/medium` | `2px` |
| `spacing/radius/full` | `10000px` |
| `spacing/size/2xsmall` | `16px` |
| `spacing/size/xsmall` | `20px` |
| `spinner/arc` | `#00d669` |
| `spinner/track` | `#3a3a3a` |

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