Examples

Determinate

valueLabel gives screen readers and the visible value the same wording.

Preview
Example.tsx
import { Progress, Stack } from '@reactloom/ui';

export default function Example() {
  return (
    <Stack gap="5" style={{ width: '100%', maxWidth: 420 }}>
      <Progress label="Uploading invoices.csv" value={64} />
      <Progress label="Storage" value={46} max={50} tone="warning" valueLabel="46 of 50 GB" />
      <Progress label="Import complete" value={100} tone="success" size="sm" />
    </Stack>
  );
}

Indeterminate

Preview
Example.tsx
import { Progress } from '@reactloom/ui';

export default function Example() {
  // No value: duration unknown. Under reduced motion the bar pulses instead of sliding.
  return (
    <div style={{ width: '100%', maxWidth: 420 }}>
      <Progress label="Preparing your export" />
    </div>
  );
}

API reference

Progress props
PropTypeDefault
value
Omit for indeterminate.
number—
min / max
number0 / 100
label
Accessible name.
ReactNode—
valueLabel
e.g. “3 of 8 files”.
string“{n}%”
showValue
booleantrue when determinate
tone
'accent' | 'success' | 'warning' | 'danger''accent'
size
Track thickness.
'sm' | 'md' | 'lg''md'

Customization

Extracted from the component’s source on every build, so it matches the code. How the layers fit together is explained in Customization.

State attributes

Target these in your CSS to style states without depending on class names.

AttributeValues
[data-indeterminate]present when on
[data-size]sm · md · lg
[data-tone]accent · success · warning · danger

Theme tokens it reads

--pl-color-accent-solid --pl-color-bg-muted --pl-color-danger-solid --pl-color-fg-default --pl-color-fg-muted --pl-color-success-solid --pl-color-warning-solid --pl-font-size-sm --pl-radius-full

Accessibility

  • Exposes aria-valuenow, -min, -max and -valuetext; indeterminate bars omit the value.
  • Animation becomes a gentle pulse under reduced motion.

Usage guidelines

Do

  • Announce completion with a polite Alert.

Don’t

  • Don’t use a progress bar for a spinner-length wait (< 1 s).