No.350 · Feedback· New
Progress Bar
How far along something is, shown five ways: a bar with its label and value (with an optional buffer), equal steps, a bar for work of unknown length, a colourful bar that reveals its gradient as it grows, and a ring.
The prompt
Written for the variant you picked above: Linear
Build a progress indicator in the single look selected below, with a label and a value (0–100), at three sizes (4, 8 and 12px tall), 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' or 'Step 3 of 5'). Tracks are fully rounded. Value changes ease over 0.45s. At 100 the fill turns green (#15803d / #3fb950). Palette (light / dark): ink and fill #18181b / #ececef, muted #6b6b73 / #a1a1aa, track #ececef / #232327, buffer #c9c9cf / #4a4a52. 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. Show three examples, the first climbing unevenly to 100, resting, and starting over, on a white panel and a #0b0b0c panel side by side. Selected variant — Linear (linear): Linear: a single fill that scales from the left. Optionally a lighter buffer fill behind it (for media, 'Buffered ahead'). Examples: 'Uploading assets' climbing, 'Storage' at 72% reading '7.2 GB of 10 GB' (large), and a small media bar with a buffer. 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, slows the sliding bar and stops the stripes. Accessibility: role=progressbar with a label, min, max, now and a human value text; work of unknown length leaves out the value and sets aria-busy. Responsive behavior: Bars fill their container; rings wrap in a row; the panels stack on narrow screens. 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, slows the sliding bar and stops the stripes.
- Accessibility
- role=progressbar with a label, min, max, now and a human value text; work of unknown length leaves out the value and sets aria-busy.
- Responsive
- Bars fill their container; rings wrap in a row; the panels stack on narrow screens.
- On touch
- Nothing to tap.