Data

Progress Ring

A ring that fills on a spring toward a goal, with the percent rolling in the middle.

Preview

Installation

Terminal
npx @usefluid/cli add progress-ring

Usage

ProgressRing.tsx
import { ProgressRing } from "./ProgressRing";

<ProgressRing label="Monthly goal" value={73} />

API reference

PropTypeDefaultDescription
labelstring—What is measured. Shown under the percent and used as the accessible name.
valuenumber—How much is done. Change it and the ring flows to it.
maxnumber100The goal.
sizenumber168Width and height in pixels.
localestringthe browser'sLocale for the percent.

Keyboard and screen readers

A progress bar with its label, minimum, maximum and current value. With reduced motion the ring changes at once and does not swell.

Notes

The spring overshoots a little, so the ring passes its mark and comes back. Every colour comes from the --fluid-* variables, and the piece is yours to change.

How it is made

One spring drives both the arc and the number, with a little overshoot, so the ring passes its mark and settles back like something with weight. At the goal the stroke swells once. It is a progress bar for screen readers, with its label and values.

For your agent

For your agent

Add Progress Ring to my project with the Fluid library. Use ProgressRing for the goals and quotas of my dashboard, with the real targets. Read my project first. Use my logo, my colours and my font through the --fluid-* variables. Keep 44px touch targets, visible focus and reduced motion. If I have no SVG logo, ask before making one up.