Skip to content

Progress indicators

Expressive

Linear and circular indicators, determinate or indeterminate, flat or wavy.

import { LinearProgressIndicator, CircularProgressIndicator } from '@windmorph/react';

Props

By name or description, across the 24 props below

LinearProgressIndicator 12 props

  • stopIndicatortype booleandefault true

    The dot at the end of a determinate track (Compose draws it).

  • valuetype number

    Progress from 0 to 1; leave it out for an indeterminate indicator.

  • wavytype booleandefault false

    The M3 Expressive wavy indicator.

  • thicknesstype numberdefault 4

    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.

  • trackThicknesstype numberdefault the same as thickness

    Thickness of the track in px.

  • tracktype booleandefault true

    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' }}.

  • reftype Ref<HTMLDivElement>

    Ref to the root element.

Text

  • aria-labeltype string

    Names the indicator ("Loading messages"). Required unless aria-labelledby is set.

  • aria-labelledbytype string

    The id of the visible text that names the indicator. Required unless aria-label is set.

Also accepts the root element's HTML attributes (id, data-*, event handlers).

CircularProgressIndicator 12 props

  • sizetype numberdefault 40, or 48 when wavy, plus any extra thickness

    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).

  • valuetype number

    Progress from 0 to 1; leave it out for an indeterminate indicator.

  • wavytype booleandefault false

    The M3 Expressive wavy indicator.

  • thicknesstype numberdefault 4

    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.

  • trackThicknesstype numberdefault the same as thickness

    Thickness of the track in px.

  • tracktype booleandefault true

    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' }}.

  • reftype Ref<HTMLDivElement>

    Ref to the root element.

Text

  • aria-labeltype string

    Names the indicator ("Loading messages"). Required unless aria-labelledby is set.

  • aria-labelledbytype string

    The id of the visible text that names the indicator. Required unless aria-label is set.

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.

Progress indicators tokens (md-comp-progress-indicator)
VariableDefaultPaintsCompose
--md-comp-progress-indicator-active-indicator-colorvar(--md-sys-color-primary)The active indicator: the line or arc that shows progress.ProgressIndicatorTokens.ActiveIndicatorColor
--md-comp-progress-indicator-track-colorvar(--md-sys-color-secondary-container)The track behind the active indicator.ProgressIndicatorTokens.TrackColor
--md-comp-progress-indicator-stop-indicator-colorvar(--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.

  • 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.

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 primary active indicator and stop dot on a secondary-container track, 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 stopIndicator dot (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.