Skip to content

No.364 · Feedback· New

Linear Progress

A bar with its label and value above it: one fill that scales from the left, an optional lighter buffer behind it for media, and a green finish at 100.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Light

Build a linear progress indicator with a label and a value (0–100). Inter 500 at 14px. Above the bar: the label on the left and the value on the right in muted tabular figures (the rounded percentage, or a detail such as '7.2 GB of 10 GB'). Bars come in three sizes (4, 8 and 12px tall) with fully rounded tracks; value changes ease over 0.45s. A single fill scales from the left; optionally a lighter buffer fill sits behind it (for media, 'Buffered ahead'). At 100 the fill 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. 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: 'Uploading assets' climbing unevenly to 100, resting, and starting over; 'Storage' at 72% reading '7.2 GB of 10 GB' (large); and a small media bar with a buffer. Selected variant — Light (light): Palette for this theme (Light): --prgb-buffer #c9c9cf; --prgb-done #15803d; --prgb-fill #18181b; --prgb-ink #18181b; --prgb-soft #6b6b73; --prgb-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. Pair it with a cancel control if the work can be stopped. Motion: Fills ease to each new value over 0.45s. Reduced motion jumps straight to the value. Accessibility: role=progressbar with a label, min, max, now and a human value text. Responsive behavior: Bars fill their container. 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. Pair it with a cancel control if the work can be stopped.
Motion
Fills ease to each new value over 0.45s. Reduced motion jumps straight to the value.
Accessibility
role=progressbar with a label, min, max, now and a human value text.
Responsive
Bars fill their container.
On touch
Nothing to tap.

Featured

425 components