Build a progress bar — the strip that fills up to show how far along an operation is. It looks trivial (a coloured div inside a grey one), but doing it right means two things: mapping a 0–100 number to the fill's width, and making it accessible, so a screen reader can announce "65%" instead of seeing a meaningless <div>. This is the base for the whole progress-bar family that follows.
// A self-contained component. No props.
function App(): JSX.Element;
A track with a coloured fill whose width reflects a percentage, plus a control to change it.
pct = 0 → fill width 0% (empty)
pct = 65 → fill width 65%
pct = 100 → fill width 100% (full)
Accessibility — the track is a progressbar:
role="progressbar" aria-valuenow={pct} aria-valuemin={0} aria-valuemax={100}
A screen reader then announces e.g. "65 percent".
width is ${pct}%. Keep the value clamped to 0–100 so it never overflows the track.progressbar. A bare <div> tells assistive tech nothing. Add role="progressbar" and aria-valuenow/min/max so the value is announced.% label, and aria-valuenow all come from the same state value — never set them independently.