Feedback
Progress
Linear progress for tasks with a known value (determinate) or an unknown duration (indeterminate).
import { Progress } from '@reactloom/ui';Examples
Determinate
valueLabel gives screen readers and the visible value the same wording.
Uploading invoices.csv
Storage
Import complete
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
Preparing your export
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
| Prop | Type | Default |
|---|---|---|
valueOmit for indeterminate. | number | — |
min / max | number | 0 / 100 |
labelAccessible name. | ReactNode | — |
valueLabele.g. “3 of 8 files”. | string | “{n}%” |
showValue | boolean | true when determinate |
tone | 'accent' | 'success' | 'warning' | 'danger' | 'accent' |
sizeTrack 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.
| Attribute | Values |
|---|---|
[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).