Progress
A horizontal bar that indicates completion progress.
Import
import { Progress } from '@matix/components/progress';Usage
Loading0%
Sizes
With Label
<Progress value={72} label="Uploading…" />With Value Display
Set showValue to display the current percentage alongside the bar.
<Progress value={45} max={100} showValue />Indeterminate
Omit value to render an indeterminate (loading) state.
<Progress label="Processing…" />Custom Max
<Progress value={3} max={10} showValue label="Step 3 of 10" />Custom Styles
import * as stylex from '@stylexjs/stylex';
import { colors } from '@matix/tokens';
const custom = stylex.create({
branded: { color: colors.primary },
});
<Progress value={65} sx={custom.branded} />;API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | Current progress value. Omit for indeterminate state. |
max | number | 100 | Maximum value |
size | 'sm' | 'md' | 'lg' | 'md' | Bar height preset |
label | ReactNode | — | Accessible label displayed above the bar |
showValue | boolean | false | Show the numeric percentage |
sx | StyleXStyles | — | StyleX style override |
Accessibility
- Built on Base UI Progress — renders
role="progressbar"witharia-valuenow,aria-valuemin, andaria-valuemax. - When
labelis provided, it is associated viaaria-labelledby. - In indeterminate mode (no
value),aria-valuenowis omitted so assistive technology announces the bar as indeterminate. - The indeterminate bar slides across the track. Under
prefers-reduced-motion: reduce, it fills the track and pulses its opacity instead, so it does not read as a 40% value.