Progress
The Progress component provides a flexible UI element for displaying progress indicators — either a measurable (determinate) bar or an ongoing (indeterminate) loading state.
Waterfall progress
WaterfallProgress is a thin bar for showing where a task starts and ends within a larger timeline, such as steps in a pipeline run. startOffset and value are percentages (0–100) of the track; theme colors the fill and inProgress animates it.
import { WaterfallProgress } from "@harnessio/ui/components";
<WaterfallProgress startOffset={30} value={40} theme="info" inProgress />;Installation
import { Progress } from '@harnessio/ui/components'
//...
return ( <Progress value={0.75} state="processing" />)Anatomy
Progress renders a bar with optional label, subtitle, description, a percentage, and a status icon.
variant—defaultfor a measurable bar driven byvalue, orindeterminatefor an ongoing animation with no known completion.value— a number from 0 to 1 (clamped) shown as a percentage. Required for thedefaultvariant; not accepted whenindeterminate.statevscolor— choose one.statemaps to semantic feedback (processing, completed, paused, failed) with a matching icon;colorsets a palette theme for the bar fill.- Text —
labelsits above the bar (with the percentage unlesshidePercentage), andsubtitle/descriptionsit below.
<Progress value={0.5} state="processing" label="Analytics_Report_March.csv" subtitle="5 min left"/>Best practices
Do
- Use the
defaultvariant with a realvaluewhenever you can estimate completion; reserveindeterminatefor waits of unknown length. - Use
stateto communicate outcome (completed, paused, failed) rather than encoding it only in the color. - Pair a
labelwith the percentage so people know what’s progressing.
Don’t
- Don’t pass both
stateandcolor— they’re mutually exclusive. - Don’t leave a bar stuck at an indeterminate animation once you know the actual progress; switch to a determinate value.
Accessibility
Labeling
Progressrenders a native HTML<progress>element, which carries built-in progress-bar semantics — no extra ARIA roles are added.- When you pass an
id(or let one be generated), thelabelis associated with the bar viahtmlFor, so the label is announced with the progress value.
Known limitations
- No explicit ARIA value attributes. Value semantics come from the native element (
value/max) rather than explicitaria-valuenow/aria-valuemin/aria-valuemax. In the indeterminate variant the element has no value, matching the native indeterminate state. - Icon reflects
state, notcolor. Whencoloris set (andstateis therefore unset) the status icon falls back to the neutral default; usehideIconif that icon isn’t meaningful.
Properties
Progress
Prop | Required | Default | Type |
|---|---|---|---|
| variant | false | 'default' | 'default' | 'indeterminate' |
| value | false | number | |
| state | false | 'default' | 'default' | 'processing' | 'completed' | 'paused' | 'failed' |
| color | false | 'gray' | 'blue' | 'brown' | 'cyan' | 'green' | 'forest-green' | 'indigo' | 'lime' | 'mint' | 'orange' | 'pink' | 'purple' | 'red' | 'violet' | 'yellow' | |
| size | false | 'md' | 'sm' | 'md' | 'lg' |
| label | false | string | |
| subtitle | false | string | |
| description | false | string | |
| hidePercentage | false | false | boolean |
| hideIcon | false | false | boolean |
| hideContainer | false | false | boolean |
| id | false | string | |
| className | false | string |
WaterfallProgress
Prop | Required | Default | Type |
|---|---|---|---|
| value | true | number | |
| startOffset | false | 0 | number |
| theme | false | 'muted' | 'muted' | 'info' | 'success' | 'warning' | 'danger' |
| inProgress | false | false | boolean |
| label | false | string | |
| tooltipContent | false | ReactNode | |
| tooltipProps | false | Partial<TooltipProps> | |
| className | false | string |