No.368 · Feedback· New
Ring Progress
A circle that fills clockwise from 12 o'clock with the percentage in the middle, and the label and a muted detail beside it. For downloads, profile completeness and usage.
The prompt
Written for the variant you picked above: Light
Build a circular progress indicator with a label and a value (0–100). Inter 500. A 72px circle (48 and 96px at the other sizes) drawn as two 6px SVG strokes: the track and a round-capped arc from 12 o'clock driven by stroke-dashoffset (easing over 0.5s), with the percentage in the middle (600, tabular) and the label and a muted detail beside it. At 100 the arc turns green. Semantics: role=progressbar on the track, labelled by the label, with aria-valuemin/max/now and aria-valuetext set to the detail when there is one. Put the role on the whole ring. Palette (light / dark): ink and fill #18181b / #ececef, muted #6b6b73 / #a1a1aa, track #ececef / #232327. At 100 the fill turns green (#15803d / #3fb950). Show three examples on a white / #0b0b0c page. Examples: 'Download' climbing with '1.6 GB of 2.4 GB' (large), 'Profile' at 80% with '4 of 5 done', 'CPU' at 42% (small). Selected variant — Light (light): Palette for this theme (Light): --rprg-done #15803d; --rprg-fill #18181b; --rprg-ink #18181b; --rprg-soft #6b6b73; --rprg-track #ececef. Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "light". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: None; it reports progress. Motion: The arc eases over 0.5s. Reduced motion jumps straight to the value. Accessibility: role=progressbar on the ring with a label, min, max, now and a human value text. Responsive behavior: Rings keep their size and sit in a column in the demo. Touch: Nothing to tap. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- None; it reports progress.
- Motion
- The arc eases over 0.5s. Reduced motion jumps straight to the value.
- Accessibility
- role=progressbar on the ring with a label, min, max, now and a human value text.
- Responsive
- Rings keep their size and sit in a column in the demo.
- On touch
- Nothing to tap.