Reach Rings
Concentric rings, the innermost a filled core holding an icon, lit from the centre out to show how far something reaches.
Default
Pass levels (the core included) and value, how far the reach goes. value + 1 rings are lit,
from the core outward: 0 lights the core alone and levels - 1 lights every ring. The icon in the
core is yours to pass. Pair the rings with the control that sets the reach, here a stepped
Radio Group: the chosen level's index is the
value.
Rings light in sequence, 70ms apart from the centre outward, over a 500ms ease-out. With
prefers-reduced-motion: reduce they change at once.
Compact
size="compact" draws the rings 112px across with 15px steps, for a narrow sheet. The default is
148px with 20px steps.
Theming
| Token | Binds | Default |
|---|---|---|
--reach-rings-key | A lit ring's stroke, halo and 5% wash, and the solid core | --interactive-primary-bg |
--reach-rings-ring | An unlit ring's stroke | --text-primary at 12% |
--reach-rings-core-ink | The icon on the lit core | --interactive-primary-text |
--reach-rings-glyph | The icon while the core is unlit | --text-primary at 50% |
A theme binds them from its yaml under components.reach-rings (key, ring, core-ink,
glyph). See Component Tokens.
Installation
npx visor add reach-ringsThis copies two files into your project:
components/ui/reach-rings/reach-rings.tsx— the componentcomponents/ui/reach-rings/reach-rings.module.css— the styles
API Reference
ReachRingsProps
| Prop | Type | Default | Description |
|---|---|---|---|
levels* | number | — | How many rings, the filled core included. |
value* | number | — | How far the reach goes: 0 (the core alone) to levels - 1 (every ring). value + 1 rings are lit, from the centre out; -1 lights none. |
icon | ReactNode | — | The glyph in the core, passed in by the consumer. |
size | 'default' | 'compact' | 'default' | default is 148px across; compact is 112px. |
The component also accepts all standard <div> HTML attributes, on the root.
Accessibility
- The rings are decorative: the root is
aria-hidden="true"and announces nothing. - The control beside them carries the state and the names, so pair the rings with one (a stepped Radio Group, say) and never show them alone as the only sign of a setting.
Proportion Bar
One measured total split into named parts, widths proportional to value, with hatched, striped and alert fills and an optional legend.
Segmented Progress
Discrete per-step progress meter — N equal pill segments in a row, each individually expressing done, current, or pending state, with optional step labels and a failed state.