Bedform UILoading & Progress
Progress Bar
Show current progress.
Progress Bar
*
string
*
*
*
number
*
number
Usage
import { ProgressBar } from "@bedform/ui/progress-bar";
export function DownloadProgress() {
return <ProgressBar value={65} max={100} aria-label="Download progress" />;
}Labels
Use an adjacent output when progress needs a visible label. Place it before or after the progress bar to choose the label position.
<ProgressBar value={65} max={100} aria-labelledby="download-label" />
<output className="ore-progress-bar-label" id="download-label">
65%
</output>
<output className="ore-progress-bar-label" data-align="start" id="chunks-label">
65 of 100 chunks
</output>
<ProgressBar value={65} max={100} aria-labelledby="chunks-label" />API
ProgressBar renders a native progress element, accepts all of its attributes, including value and max, and forwards its ref to it. Omit value for an indeterminate progress state.
Public classes
| Class | Purpose |
|---|---|
.ore-progress-bar | Native progress element |
.ore-progress-bar-label | Optional visible label |
CSS variables
| Variable | Purpose |
|---|---|
--ore-progress-bar-unit | Base size unit |
--ore-progress-bar-frame | Frame and empty track color |
--ore-progress-bar-fill | Filled track color |
--ore-progress-bar-label | Label text color |
Accessibility
The native progress element provides progressbar semantics and value information. Give it an accessible name with aria-label or aria-labelledby; a visible output can provide that name.