Progress Bar

A thin bar that shows progress, or moves when there is no number to show.

Usage

tsx
<ProgressBar mode="determinate" value={70} aria-label="upload" />

Without a number

The default mode loops, for work you can't measure. It sets no aria-valuenow.

tsx
<ProgressBar aria-label="loading" />

Colour

tsx
<ProgressBar mode="determinate" value={62} fill="var(--margo-color-on-main)" />

Jumping

Changes slide by default. With animate={false} the bar jumps, which suits a reset to zero.

tsx
<ProgressBar mode="determinate" value={value} animate={false} />

Reference

proptypedefault
as?ElementType"div"the element or component to render
mode?"determinate" | "indeterminate""indeterminate"determinate shows value, indeterminate loops
value?number0a percentage, clamped between 0 and 100
animate?booleantruefalse jumps to a new value instead of sliding
delay?number | string—waits before animating; a number is milliseconds
fill?stringthe primary gradientany background: a colour or a gradient
className?string—added after the component's own class: what you set wins
…restprops of as—typed against the chosen element