|Kit

Circular Progress

Ring progress indicator. Filled and gradient arcs across eleven colors, with a built-in indeterminate spinner — the circular counterpart of Progress.

CircularProgress is the ring counterpart of Progress — same Ark UI machine (so role="progressbar", the aria-value* wiring, and indeterminate come for free), same variant × color axes. The arc is a stroked SVG circle, so it clips cleanly at any size.

import { CircularProgress } from '@42-central/ui-react/circular-progress';

<CircularProgress value={65} />
<CircularProgress variant="gradient" value={70} />
<CircularProgress value={80}>80%</CircularProgress>
<CircularProgress value={null} /> {/* indeterminate */}
<CircularProgress meter value={82} aria-label="Score" /> {/* a measurement, not a task */}

Playground

Component

Loading preview

Modes

Props

Code

<Component size="lg" value={65} />

Full prop browser

Variants

Two arc treatments. filled (default) routes through the palette; gradient paints its own stops.

Code

<CircularProgress variant="filled" value={65} />
<CircularProgress variant="gradient" value={65} />

Colors

Any palette color pairs with the filled variant via the kit's data-color system.

Code

<CircularProgress color="green" value={70} />
<CircularProgress color="orange" value={45} />
<CircularProgress color="red" value={20} />

Gradient

Like the linear Progress bar, the gradient is fixed to the whole ring and the arc reveals it — so the complete from→to only shows once the ring closes at 100%. Pass a gradient config (from / to / via) to customize the stops (dir is ignored — the SVG sweep runs top-left → bottom-right).

Code

<CircularProgress variant="gradient" value={40} />
<CircularProgress variant="gradient" value={70} />
<CircularProgress variant="gradient" value={100} />

Sizes

Five diameters, matching the kit's xs–xl scale. Override the stroke width with thickness.

Code

<CircularProgress size="xs" value={65} />
<CircularProgress size="sm" value={65} />
<CircularProgress size="md" value={65} />
<CircularProgress size="lg" value={65} />
<CircularProgress size="xl" value={65} />

Both size and thickness also accept a raw px number, independently of each other — handy for a diameter or stroke weight that doesn't fit the tee-shirt scale.

Code

<CircularProgress size={100} thickness={8} value={40} />

Label

Pass children to render centered content — typically a percentage readout.

80%

Code

<CircularProgress value={80} size="xl" color="green">
  <span className="text-sm font-mono font-medium">80%</span>
</CircularProgress>

Indeterminate

When you can't measure progress, pass value={null} — a fixed arc spins (disabled under the OS "reduce motion" setting, where it rests in place). Toggling indeterminate on or off morphs the arc between the value and the spinner rather than snapping — toggle it in the playground to see it.

Code

<CircularProgress value={null} />

Meter

A ring that measures something rather than tracking a task (a skill score, a quota, a capacity) is a meter, like HTML's <meter>. Pass meter and the ring announces itself as role="meter" instead of role="progressbar". It works exactly like Progress's meter: never indeterminate (value={null} is a type error), an aria-valuetext formatted in the active locale (locale, formatOptions, translations.value), and optional low / high / optimum thresholds that colour the arc green, orange or red by zone and write data-zone on the ring.

Code

{/* Higher is better: red below 40, orange to 70, green from 70 */}
<CircularProgress meter value={32} low={40} high={70} optimum={100} aria-label="Score" />
<CircularProgress meter value={58} low={40} high={70} optimum={100} aria-label="Score" />
<CircularProgress meter value={86} low={40} high={70} optimum={100} aria-label="Score" />

API

Prop

Type

All other props are forwarded to the underlying Ark Progress.Root.

Accessibility

Ark stamps role="progressbar" plus aria-valuenow / aria-valuemin / aria-valuemax on the ring. In the indeterminate state aria-valuenow is dropped. Provide an aria-label (or wire aria-labelledby to a visible caption) so the ring names what it tracks; without one, Ark names it by its own value. aria-valuetext replaces the number when words say it better. All four naming props land on the ring itself, not the wrapping root, so they are read together with the value:

<CircularProgress value={uploaded} aria-label="Upload progress" />
<CircularProgress value={null} aria-labelledby="file-name" aria-valuetext="Processing" />

With meter, the ring becomes role="meter" and also writes an aria-valuetext formatted in the active locale.

Centered children are plain text beside the ring, so a 42% label is read in addition to the progressbar's own value. Prefer aria-valuetext for a custom reading, and wrap a purely visual label in aria-hidden.

Changelog

v0.30.0
  • New meter prop shows a measurement (role="meter") instead of a task's progress, with low / high / optimum zones in green, orange or red

    #482
  • locale, formatOptions and translations are now documented, and locale follows IntlProvider

    #482
v0.20.0
  • aria-label, aria-labelledby, aria-describedby and aria-valuetext land on the progressbar itself

    #388
v0.19.0
  • These entry points ship "use client", so a Server Component can import them

    #320
v0.18.0
  • asChild is a compile error on CircularProgress, Progress, Rating, Slider, Divider, Field, InputBase and PillsInput

    #294
v0.14.0
  • Tracks move onto the kit's translucent wash, and the slider thumb's center is brand-tinted

    #207
v0.6.0
  • size and thickness accept a size token or a number

    #100
v0.0.1
  • Progress and CircularProgress, with a gradient variant

On this page