Rost

← All components

component

Progress

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

In code Contract: review Guidance: proposed Contract on GitHub Figma 733:172 As markdown
Positive
Warning
Negative

Install

npx github:Runceanu/rost add progress

It lands in src/rost/progress/, with what it needs and its contract. Install has the rest.

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.

    Use Skeleton

  • 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".

Props

PropTypeValuesDefault
value number
max number 100
tone enum positive · warning · negative positive
label string

Values

Straight from the contract. Each value sits next to its token, because six tokens here all come out as #3a3a3a and the colour alone can't tell you which one is right.

Never changes

root

  • height 4px spacing/gap/2xsmall
  • border-radius 10000px spacing/radius/full
  • background #3a3a3a progress/track

displayblock · positionrelative · overflowhidden · width100%

fill

  • border-radius 10000px spacing/radius/full
  • transition-duration 450ms motion/duration/slow
  • transition-timing-function cubic-bezier(0.4, 0, 0.2, 1) motion/easing/move

displayblock · height100% · transition-propertywidth

Changes by variant

3 variants. Each table is what one thing changes with: a column per tone, a row per property. Where every row starts with the same token path, it's written once, under the property.

Follows tone

PropertyPositiveWarningNegative
fill.backgroundprogress/fill/… positive #00d669 warning #fda50d negative #f2705f

Part of Progress

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.

In code Contract: review Guidance: proposed Contract on GitHub Figma 749:20 As markdown
Positive
Warning
Negative

Install

npx github:Runceanu/rost add progress-ring

It lands in src/rost/progress-ring/, with what it needs and its contract. Install has the rest.

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.

    Use 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.

Props

PropTypeValuesDefault
value number
max number 100
tone enum positive · warning · negative positive
label string

Values

Straight from the contract. Each value sits next to its token, because six tokens here all come out as #3a3a3a and the colour alone can't tell you which one is right.

Never changes

root

  • width 40px spacing/size/medium
  • height 40px spacing/size/medium

displayinline-block · flex-shrink0

svg

displayblock · width100% · height100% · transformrotate(-90deg)

track

  • stroke #3a3a3a progress-ring/track
  • stroke-width 4px spacing/outline/large

fillnone

arc

  • stroke-width 4px spacing/outline/large
  • transition-duration 450ms motion/duration/slow
  • transition-timing-function cubic-bezier(0.4, 0, 0.2, 1) motion/easing/move

fillnone · stroke-linecapbutt · transition-propertystroke-dasharray

Changes by variant

3 variants. Each table is what one thing changes with: a column per tone, a row per property. Where every row starts with the same token path, it's written once, under the property.

Follows tone

PropertyPositiveWarningNegative
arc.strokeprogress-ring/… positive #00d669 warning #fda50d negative #f2705f