[ Feedback ]

Progress

A horizontal bar showing how far a task has progressed. Leave value out for an indeterminate, looping bar.

6 examplesDark modeAccessible

Import#

import { Progress } from 'reusify-ui';

When to use#

  • File uploads, multi-step processes, quotas and usage meters.

Examples#

With label & value#

Uploading report.pdf10%
<Progress value={45} label="Uploading report.pdf" showValue />

Colors & sizes#

Storage95%
<Progress value={30} size="sm" />
<Progress value={60} color="success" />
<Progress value={85} color="warning" size="lg" />
<Progress value={95} color="danger" label="Storage" showValue />

Indeterminate#

Omit value when you don't know how long it will take.

Processing…
<Progress label="Processing…" />

Ticks variant#

variant="ticks" draws a filled bar with a marker at the value, then tick marks for what is left. color also takes any CSS color or gradient.

67%
<Progress
  variant="ticks"
  value={67}
  ticks={26}
  showValue
  color="linear-gradient(90deg, #38bdf8, #2563eb 70%, #60a5fa)"
/>
<Progress variant="ticks" value={35} size="sm" color="success" />

Bars variant and glow#

variant="bars" is a row of thin bars, colored up to the value with a taller marker. glow adds a soft halo in the bar color (pass a color when color is a gradient).

Progress64%
<Progress variant="bars" value={64} ticks={48} color="#f26b3a" label="Progress" showValue />
<Progress value={68} size="lg" color="#4ade80" glow />

Capsule variant#

variant="capsule" is a thick pill: the fill carries an icon at its end (or the percentage with showValue) and endLabel sits on the right. Pair it with a gradient and glow for a live tracker.

-7H 01M
72%
2 of 3 GB
<Progress
  variant="capsule"
  value={46}
  color="linear-gradient(90deg, #e9f97a, #a3e635 60%, #65a30d)"
  glow="#a3e635"
  icon={<MdFlight style={{ transform: 'rotate(90deg)' }} />}
  endLabel="-7H 01M"
/>
<Progress variant="capsule" size="sm" value={72} color="info" showValue endLabel="2 of 3 GB" />

Used in designs#

Progress in real layouts: these 9 designs use it. Open one to try it and copy the code.

API reference#

<Progress />

Also accepts every <div> attribute.

value-
number

Current value. Omit for indeterminate.

max100
number

Value that means "complete".

variant'bar'
'bar' | 'ticks' | 'bars' | 'capsule'

Plain bar; fill + marker + ticks; a row of thin bars; or a thick pill with an icon.

icon-
ReactNode

Icon at the end of the fill (capsule).

endLabel-
ReactNode

Text at the right end of the track (capsule).

glowfalse
boolean | string

Soft halo; true uses the color, a string sets the glow color.

ticks24
number

Ticks for a full track (ticks and bars variants).

label-
ReactNode

Text above the bar (also used as aria-label when a string).

showValuefalse
boolean

Shows the percentage (inside the fill for ticks).

size'md'
'sm' | 'md' | 'lg'

Bar thickness.

color'primary'
semantic | string

Semantic name, or any CSS color or gradient.

Accessibility#

  • Uses role="progressbar" with aria-valuemin, aria-valuemax and aria-valuenow (omitted when indeterminate).