Weftv0.4.0
GitHubFigma
Blade AI
Display & Navigation · Progress Barstable

Progress Bar

A horizontal bar showing how far a task has got, with six intents, two heights, an optional label and percentage, and an indeterminate mode.

Preview

#preview

Switch size, intent, value and label. Show code opens the React and CSS below.

Uploading settlement file50%
size medium · primary · 50%
progress-bar-example.tsx
import { ProgressBar } from "@blade-ai/weft/components/progress-bar";

export function UploadProgress({ percent }: Props) {
  return (
    <ProgressBar
      value={percent}
      showValue
      label="Uploading settlement file"
    />
  );
}

All states

#all-states

Six intents at 0, 50 and 100 percent plus indeterminate, then the small size and label rows.

Progress Bar · 32 variants · medium unless noted
Primary · 0%
Primary · 50%
Primary · 100%
Primary · Indeterminate
Positive · 0%
Positive · 50%
Positive · 100%
Positive · Indeterminate
Negative · 0%
Negative · 50%
Negative · 100%
Negative · Indeterminate
Notice · 0%
Notice · 50%
Notice · 100%
Notice · Indeterminate
Information · 0%
Information · 50%
Information · 100%
Information · Indeterminate
Neutral · 0%
Neutral · 50%
Neutral · 100%
Neutral · Indeterminate
Small · 0%
Small · 50%
Small · 100%
Small · Indeterminate
Uploading settlement file
With label
Uploading settlement file50%
With label and value
50%
Value only
Preparing export
Label · indeterminate

Props

#props

Omit value for the indeterminate state: the bar slides and no percentage shows.

Prop
Type
Default
Description
value
number
—
Current value from 0 to 100. Omit for the indeterminate state.
label
string
—
Text above the bar, for example "Uploading settlement file". Also the accessible name.
showValue
boolean
false
Show the "50%" readout at the end of the label row. Ignored when indeterminate.
intent
"primary" | "positive" | "negative" | "notice" | "information" | "neutral"
"primary"
Fill colour.
size
"small" | "medium"
"medium"
Bar height 4 / 8px.
accessibilityLabel
string
—
Accessible name when there is no visible label.
className
string
—
Extra classes on the root. Other div attributes pass through to the track.

Usage

#usage

Short rules for using progress bar.

Do
Use a determinate bar when you know the percentage.
Label what is progressing.
Match intent to meaning: positive for done, negative for failed.
Use indeterminate when the length is unknown.
Don't
Don't show a determinate bar that jumps backwards.
Don't use colour alone to signal failure; add text.
Don't use it for a single quick action; use Spinner.
Don't stack many bars when one overall value will do.

Accessibility

#accessibility

role="progressbar" with a 0 to 100 range. Indeterminate reports Loading.

Keyboard
Key
Action
—
Not focusable. Progress Bar is a read-only status and takes no keyboard input.
ARIA
Element
Role / attribute
When
Track
role="progressbar", aria-valuemin=0, aria-valuemax=100
Always.
Track
aria-valuenow
Determinate only; the rounded, clamped value.
Track
aria-valuetext="Loading"
Indeterminate only.
Track
aria-label
label, else accessibilityLabel, else "Progress".