Progress bar
A measure of how much of a task is done, or a sign that it is under way.
import { Progress } from '@uthereal/ui/progress'Progress playground
Overview
A rounded rail on the muted surface inside a hairline, with the label and a counted percentage above it. A ring shape is also available. When the amount is unknown, indeterminate shows that work is under way instead. The label names the progressbar for assistive technology, and the value is exposed as its value text.
Use a progress bar for uploads, imports, and other tasks whose amount done your application can measure. To reserve the shape of loading content, use a skeleton.
Usage
import { Progress } from '@uthereal/ui/progress'
export function Upload({ sent, size }: { sent: number; size: number }) {
return (
<Progress label="Uploading report.pdf" value={sent} max={size} showValue />
)
}Without a label, as in Arc, no label row shows (unless showValue is on) and the progressbar is named "Progress"; to localize that name, pass a label with hideLabel. Your application owns the value and passes each update. Values outside min and max are clamped; max must be greater than min.
Examples
Tones and completion
accent is the default shown in the playground above. neutral uses ink; success, warning, and danger report outcomes alongside descriptive labels. At 100% with showValue, a drawn check settles beside the percentage.
Shapes and sizes
A bar fills its container width (sm 4 px, md 7 px). A circle renders a compact ring (sm 24 px, md 40 px) with the label and value beside it.
Indeterminate and bare states
With indeterminate, a segment travels across the bar or a quarter arc turns around the ring while aria-busy is set. Omit label to render a bare bar with no visible heading.
API reference
These serializable arguments and defaults come directly from the component schema.
| Argument | Type / default | Description |
|---|---|---|
label | string— | Visible text and accessible name. Name the task, e.g. "Uploading report.pdf". Omit it, as in Arc, to show no label row; the progressbar is then named "Progress". |
hideLabel | booleanDefault: false | Hide the label visually. It still names the progressbar for assistive technology. |
value | numberDefault: 0 | Amount done, between min and max. Values outside the range are clamped. |
indeterminate | booleanDefault: false | The amount is unknown: the bar shows moving activity and value is ignored. |
min | numberDefault: 0 | Value at which nothing is done. |
max | numberDefault: 100 | Value at which the task is complete. Must be greater than min. |
showValue | booleanDefault: false | Show the percentage, counted with the fill, at the end of the label row; at 100% a success check settles in beside it. Assistive technology reads the value from the progressbar. |
shape | bar | circleDefault: "bar" | A full-width bar, or a compact ring with the label beside it. |
size | sm | mdDefault: "md" | Bar thickness of 4 or 7 pixels (Arc's rail, a hairline included); ring diameter of 24 or 40 pixels. |
tone | neutral | accent | info | success | warning | dangerDefault: "accent" | Fill color. accent (the default, as in Arc) follows the theme accent, neutral is ink, and info, success, warning and danger report status; pair them with a label that says what happened. A finished accent or neutral fill turns success. |
recipe | studio | softDefault: "studio" | Visual treatment. Both recipes use the same interaction behavior. |
theme | ProgressTheme— | Color mode, accent, and tokens, including thickness, circleSize and circleThickness. See Theming. |
motion | none | subtle | expressiveDefault: "subtle" | Fill, count and label animation preset. Every preset uses Arc's smooth spring; none and system reduced-motion preferences jump to the value. |
motionOptions | ProgressMotionOptions— | The fill and counted value movement to a new value: a spring (default) or a tween with a duration (ms). |
dir | ltr | rtl— | Reading direction; the bar fills from the inline start. Omit it to inherit the page direction. |
React integration
| Prop | Purpose |
|---|---|
preset | Application defaults, overridden by explicit instance arguments |
tokens | CSS variables applied after the typed theme |
ref | The root <div> |
className, style | Added to the root element |
| Native attributes | id, data-* and the rest, forwarded to the root |
Keyboard & accessibility
Progress is not focusable. The bar's track (or the ring's SVG) has role="progressbar" with aria-valuemin, aria-valuemax, aria-valuenow and a percentage in aria-valuetext, and is named by the label through aria-labelledby (or "Progress" without one). hideLabel hides the label visually but keeps that name. The visible percentage is hidden from assistive technology so it is not read twice. While indeterminate, the progressbar has no value and sets aria-busy.
The fill and the rail use Arc's colors, which win over the contrast floors (see the standards); status is never color alone, because the label and the completion check say what happened. Under forced colors the fill uses the system highlight color and the rail gets an outline.
Motion and theming
As in Arc, one smooth spring that never overshoots drives the fill and the counted percentage, so the number always matches the bar, in every preset. A new label rises in through a small blur while the old one leaves upward; at 100% (with showValue) a check pops in on the snappy spring a beat after the fill lands, and an accent or neutral fill turns success 200 milliseconds later. motionOptions.transition takes a spring or a tween with a duration in milliseconds. The indeterminate segment loops every 1.4 seconds and the ring every second. motion="none" and system reduced motion jump to the value and keep indeterminate progress static; reduced motion keeps Arc's short fade on the label and check.
theme takes a mode, an accent, and tokens for text and tone colors, the rail (highlight inside a border hairline) and type, plus thickness, circleSize and circleThickness in pixels. An application-wide UtherealProvider supplies defaults.
Composition
In an agent composition, Progress is a leaf with no actions; the host updates value through composition updates. See Building with agents.
{
"type": "Progress",
"props": { "label": "Indexing documents", "value": 64, "showValue": true },
"children": []
}