Progress
A determinate or indeterminate progress indicator.
A determinate or indeterminate progress indicator.
Import
Section titled “Import”import { Progress } from "@zentara-co/zenos-ui";Variants
Section titled “Variants”Choose a semantic tone that matches the operation’s status. primary is neutral progress, success indicates a positive completion path, information supports informational work, and danger signals a failing or risky operation.
Size changes track thickness without changing the measured value.
sm
md
lg
Determinate and indeterminate
Section titled “Determinate and indeterminate”Pass a numeric value when the application knows completion. Omit value, or pass null, when duration cannot be estimated.
Determinate
Indeterminate
Compound composition
Section titled “Compound composition”Compose the parts when a visible label and formatted value belong beside the track. Connect the label to the progressbar with aria-labelledby.
Custom styling
Section titled “Custom styling”Use className on Progress.Root for layout and width. Override the track and indicator with semantic tokens on Progress.Track and Progress.Indicator; custom classes merge after the built-in variant fill, so accent backgrounds replace variant colors when both are set. Style Progress.Label and Progress.Value for tinted headers without changing bar behavior.
For a one-line bar, <Progress className="max-w-md" /> still accepts root className. For full control, compose Progress.Root, Progress.Track, and Progress.Indicator explicitly.
Variants
primarysuccessinformationdanger Sizes
smmdlg Progress.Root Progress.Track Progress.Indicator Progress.Label Progress.Value
API
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | null | null | Current value; null is indeterminate. |
max | number | 100 | Maximum value. |
variant | ProgressVariant | primary | Indicator color. |
size | sm | md | lg | md | Track thickness. |
format | (value: number, maximum: number) => ReactNode | — | Formats the visible Progress.Value content. |
Indicator.value | number | — | Overrides the root value for a custom indicator. |
Root.className | string | — | Layout and width on the progressbar root. |
Track.className | string | — | Merged after default track styles; override fill and height context. |
Indicator.className | string | — | Merged after variant indicator color; use semantic tokens to replace the default fill. |
Label.className / Value.className | string | — | Typography and color for compound label and value text. |
native props | React.HTMLAttributes<HTMLDivElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”Progress exposes role="progressbar" with minimum, maximum, and current value for determinate work. Indeterminate progress omits aria-valuenow. Give every progressbar an accessible name with aria-label or aria-labelledby; the visual Progress.Label is not connected automatically. Announce completion separately when the surrounding workflow needs a status update.