AntaProgress MENU
On this page

Progress

A progress indicator for displaying task completion. Consists of a track (background bar), an indicator (filled portion), and an optional label area.

60%42%Uploading files…3 of 775%Processing60%Uploading3 of 50%Animated
// Minimum invocation — just a value.
<Progress value={60} />
// Pair the value with a descriptive label and a right-aligned hint.
<Progress value={42} label="Uploading files…" hint="3 of 7" />
// tone="info" re-tints every internal color via the --*-info token cascade.
<Progress value={75} tone="info" label="Processing" />
// The host pre-declares border colour + style with width 0 — give it any
// width to opt in; the colour auto-tracks the tone.
<Progress value={60} label="Uploading" hint="3 of 5" style={{ borderBottomWidth: '1px' }} />
// Animate by driving `value` over time.
function AnimatedProgress({ speed = 1 }) {
const [v, setV] = useState(0)
useEffect(() => {
const id = setInterval(() => setV((x) => (x + speed) % 101), 50)
return () => clearInterval(id)
}, [speed])
return <Progress value={v} label="Animated" />
}

Playground

Preview
value
max
tone
label
hint
className
style
children

Component props

PropTypeDefaultDescription
valuenumberCurrent progress value. Negative values are clamped to 0.
hint?stringRight-aligned hint text (e.g. "3 of 7").
label?stringText label displayed after the percentage.
max?number100Upper bound of the range.
tone?neutralinfoneutralColor variant. 'info' applies a blue tint.
Inherited props (children, className, id, style, tabIndex, title)
PropTypeDefaultDescription
children?ReactNodeChild elements. When provided, replaces the component's default label/content.
className?stringCSS class name. Merged with any internal classes by the component.
id?stringHTML id attribute.
style?CSSPropertiesInline styles applied to the root element.
tabIndex?numberTab order. Set to -1 to skip the element when tabbing.
title?stringHTML title attribute — native browser tooltip on hover.

Component tokens

Progress exposes these CSS custom properties as its theming surface. Override any of them in consumer CSS to retint a single instance, or set them on a [tone="…"] selector to add a new tone variant. Tokens marked (shadow-only API) style elements inside the shadow DOM and can only be customized via these properties — consumer CSS can’t reach those elements directly.

TokenDescription
--progress-bgHost background (the track behind the indicator).
--progress-border-colorHost border colour. Also one endpoint of the indicator-edge gradient.
--progress-indicator-bg (shadow-only API)Indicator fill colour. Also the start endpoint of the indicator-edge gradient.
--progress-indicator-edge (shadow-only API)Gradient painted at the indicator’s right edge. Defaults to linear-gradient(90deg in oklch, var(--progress-indicator-bg), var(--progress-border-color)).
--progress-text-colorColour of the percentage number and the label text.
--progress-hint-colorColour of the right-aligned hint text.