Progress indicators
ExpressiveLinear and circular indicators, determinate or indeterminate, flat or wavy.
import { LinearProgressIndicator, CircularProgressIndicator } from '@windmorph/react';Props
LinearProgressIndicator 12 props
The dot at the end of a determinate track (Compose draws it).
Progress from 0 to 1; leave it out for an indeterminate indicator.
The M3 Expressive wavy indicator.
Thickness of the active indicator in px. The spec's thick configuration is 8 (with the track); the indicator grows to fit, keeping room for the wave.
Thickness of the track in px.
Draw the track (and the linear stop dot). Remove it inside a button, colouring the indicator like the button's label:
classNames={{ indicator: 'stroke-current' }}.Ref to the root element.
Text
Names the indicator ("Loading messages"). Required unless
aria-labelledbyis set.The id of the visible text that names the indicator. Required unless
aria-labelis set.
Classes for each part, by slot.
classNames.rootis merged withclassName.The outer element, which carries the
progressbarrole.The track: the line behind the active indicator.
The active indicator, the line that shows progress.
The stop dot at the end of a determinate track.
Inline styles for the root element.
Classes for the root element, merged with the component's own (yours win).
Also accepts the root element's HTML attributes (id, data-*, event handlers).
CircularProgressIndicator 12 props
The diameter in px. The spec: circular indicators "can range from 24dp to 240dp"; values outside that range are clamped. The strokes keep their
thickness; the ring and its wave grow (more waves of the same length, as in Compose).Progress from 0 to 1; leave it out for an indeterminate indicator.
The M3 Expressive wavy indicator.
Thickness of the active indicator in px. The spec's thick configuration is 8 (with the track); the indicator grows to fit, keeping room for the wave.
Thickness of the track in px.
Draw the track (and the linear stop dot). Remove it inside a button, colouring the indicator like the button's label:
classNames={{ indicator: 'stroke-current' }}.Ref to the root element.
Text
Names the indicator ("Loading messages"). Required unless
aria-labelledbyis set.The id of the visible text that names the indicator. Required unless
aria-labelis set.
Classes for each part, by slot.
classNames.rootis merged withclassName.Inline styles for the root element.
Classes for the root element, merged with the component's own (yours win).
Also accepts the root element's HTML attributes (id, data-*, event handlers).
Tokens
M3's component tokens as CSS variables. Each is unset until you set it, on :root, a theme or any ancestor, and falls back to the default shown. The root carries data-variant (and data-size where it has sizes), which picks the variables that apply. See Component tokens in the Customisation guide.
| Variable | Default | Paints | Compose |
|---|---|---|---|
--md-comp-progress-indicator-active-indicator-color | var(--md-sys-color-primary) | The active indicator: the line or arc that shows progress. | ProgressIndicatorTokens.ActiveIndicatorColor |
--md-comp-progress-indicator-track-color | var(--md-sys-color-secondary-container) | The track behind the active indicator. | ProgressIndicatorTokens.TrackColor |
--md-comp-progress-indicator-stop-indicator-color | var(--md-sys-color-primary) | The stop dot at the end of a determinate linear indicator's track. | ProgressIndicatorTokens.StopIndicatorColor |
Spec status
Built to the M3 Expressive progress indicators spec. Each item of its variants and configurations links to a live example; where the M3 Expressive column of the spec differs from the original M3 one, it wins.
| Item | Status | Details |
|---|---|---|
| Linear progress indicator | Built | Variant · Linear |
| Circular progress indicator | Built | Variant · Circular |
| Behavior: determinate | Built | Configuration · Linear, Circular |
| Behavior: indeterminate | Built | Configuration · Linear, Circular |
| Track thickness: configurable | Built | Configuration · Linear, Circular, Track |
| Shape: flat | Built | Configuration · Linear, Circular |
| Shape: wavy | Built | Configuration · Linear, Circular |
| Size: circular, 24 to 240dp | Built | Configuration · Sizes |
| Inside a button, without a track | Built | Use case · Track |
| Indeterminate circular keeps its track | Differs | Both the flat and the wavy indeterminate circular indicators draw their track, as the spec shows them moving along a fixed track; Compose hides the flat one’s. |
Linear progress indicator
BuiltVariant · Linear
Circular progress indicator
BuiltVariant · Circular
Size: circular, 24 to 240dp
BuiltConfiguration · Sizes
Inside a button, without a track
BuiltUse case · Track
Indeterminate circular keeps its track
DiffersBoth the flat and the wavy indeterminate circular indicators draw their track, as the spec shows them moving along a fixed track; Compose hides the flat one’s.
Bundle size
Gzipped, as published: the component and the library code it imports. React, React Aria, Motion and the other dependencies aren't counted, and your bundler's minifier makes it smaller still. CI fails a change that grows it past its budget.
LinearProgressIndicator,CircularProgressIndicator: 28.5 kB
M3 Expressive specs
- Variants
linear, circular
Differences from Compose
- The indeterminate circular indicator follows Compose's 6-second cycle (a 1080° turn plus a 90° step every 1.5s, the arc growing from 10% to 87% and back) and keeps its track, which the spec shows (Compose's flat one hides it).
- Shared values: a
primaryactive indicator and stop dot on asecondary-containertrack, with 4px round strokes and a 4px gap. Linear is 240px wide (4px tall, 10px wavy); circular is 40px (48px wavy). Thicker strokes grow the box by the extra thickness (Compose's thick samples: 14px linear, 52px wavy circular at 8px). - Linear draws Compose's wavy quadratics and keyframed indeterminate curves; a wavy determinate indicator flattens below 10% and above 95%. The
stopIndicatordot (on by default) shrinks once progress reaches it. - Geometry and timing are pure functions tested against Compose's numbers; the first render is a deterministic t = 0 frame (SSR-safe). The linear indicator mirrors in RTL; the circular one stays clockwise, as the spec says.