ProgressBar
A horizontal progress indicator.
Implementation Notes
- Renders a
<div>withrole="progressbar"and ARIA value attributes - Accepts
value,min, andmaxprops for the current and bounding values - Sets
aria-valuenow,aria-valuemin,aria-valuemax, andaria-label - Differs from
Progress(which renders a native<progress>element) —ProgressBaris a div-based composition for cases where the native element does not provide enough styling control
Props
label: string (required) — accessible name set onaria-labelvalue: number (required) — current valuemin: number (default: 0) — minimum valuemax: number (default: 100) — maximum valueclassName: string (optional) — extra CSS classes appended toprogress-bar
Usage
<ProgressBar label="Upload progress" value={42} max={100} />
Keyboard Interactions
- No keyboard interactions — this is a passive status indicator
ARIA
role="progressbar"identifies the element as a progress indicatoraria-valuenow,aria-valuemin,aria-valuemaxexpose the current and bounding valuesaria-labelprovides an accessible name
When to Use
- For determinate progress where the current value falls within a known range (file upload, form completion, multi-step task).
- When the consumer needs full control over the bar visualization (custom track, fill animation, segmented styles) — pick this over
Progresswhose native<progress>element is harder to style. - When you need to expose progress state to assistive technology via ARIA value attributes.
When Not to Use
- Do not use when progress is indeterminate (loading without a known endpoint) — use
ProgressSpinnerinstead. - Do not use as a circular indicator — use
ProgressCircle. - Do not use to display a measured value within a known range that is not progress (e.g. battery, disk usage) — use
Meter. - Do not use when the native
<progress>element is sufficient — useProgressfor less custom styling needs.
Headless
This headless component renders semantic HTML. The consumer provides all visual styling. No CSS, animations, or layout are included — the consumer composes those.
Styles
The component renders with .progress-bar as the root class. No default styles are included.
Related components
progress— a horizontal progress bar showing completionprogress-circle— a circular progress indicatorprogress-spinner— an indeterminate spinning progress indicatormeter— a gauge displaying a scalar value within a known rangeloading— a loading indicator, such as text, or image, or animation
References
- Documentation: index.md
- CSS class:
.progress-barin css-style-sheet-template.css