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

ClassPurpose
.ore-progress-barNative progress element
.ore-progress-bar-labelOptional visible label

CSS variables

VariablePurpose
--ore-progress-bar-unitBase size unit
--ore-progress-bar-frameFrame and empty track color
--ore-progress-bar-fillFilled track color
--ore-progress-bar-labelLabel 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.

On this page