Progress ring
A determinate 14px ring (the context meter) that warms to yellow and red.
import { ProgressRing, ProgressRingGlyph } from "@arcadia/ui"A determinate 14px ring, stroke 2, filling clockwise from 12 o'clock. The level follows the value, yellow from warmAt (0.6) and red from hotAt (0.85), unless you pass level. The value change animates, so a jump reads as growth rather than a swap.
Examples
rootStyle takes layout and these knobs. level sets the arc's colour; set --progress-ring-color only for a meter whose levels mean something else.
| Knob | Takes | Default | Sets |
|---|---|---|---|
Ref<IconSize> | var(--icon-base) | Width and height. | |
Paint | var(--icon-2) | The value arc (yellow when warm, red when hot). | |
Paint | var(--icon-4) | The full circle under the arc. |
With a label the ring is a meter with its value, range and valueText (default: the rounded percentage), so "Context used, 122k of 200k tokens" is read instead of a bare number. Without a label it is decorative, for use inside a labelled button. The levels are colour only, so say "almost full" in the valueText or a tooltip when it matters.
ProgressRing
valuerequired- number
- Fraction filled, 0..1 (clamped).
size- "sm" | "md" | "lg"Default"md"
- 12 / 14 / 16 px. 14, the context meter.
level- "normal" | "warm" | "hot"
- Colour level. Default: derived from
valuewithwarmAt/hotAt. warmAt- numberDefault0.6
- Yellow from here.
hotAt- numberDefault0.85
- Red from here.
label- string
- Accessible name ("Context used"). With a label the ring is a
meter(value, min, max andvalueText); without one it is decorative, for use inside a labelled button. valueText- string
- Spoken value, e.g. "61k of 1,008k tokens". Default: the rounded percentage.
rootStyle- RootStyle<ProgressRingKnobs>
- Typed StyleX override: layout and the
--progress-ring-*knobs.
Rest props go to <span> props and render.