Progress
View as MarkdownExpose determinate or indeterminate task progress. CSS only
<div class="ui-progress"> <div data-ui-part="header"> <label for="progress-documentation-build">Documentation build</label> <output for="progress-documentation-build" data-ui-part="output">68%</output> </div> <progress id="progress-documentation-build" max="100" value="68" aria-describedby="progress-documentation-build-hint"></progress> <p id="progress-documentation-build-hint" data-ui-part="hint">Generating component references.</p></div>Install
import '@timelessui/components/css/tokens.css'import '@timelessui/components/css/core/progress.css'import '@timelessui/components/css/themes/atmosphere/tokens.css'import '@timelessui/components/css/themes/atmosphere/progress.css'Anatomy
Parts are authored in your own markup and identified by the selector below, so your CSS can target the same anatomy without loading Timeless styles. Required parts must be present for the component to work. Private data-ui-internal-* hooks are written by the runtime and must never be authored.
| Part | Required | Selector | Purpose |
|---|---|---|---|
header | No | [data-ui-part~='header'] | Row holding the label and output. |
output | No | [data-ui-part~='output'] | Live percentage or count. Use <output>. |
hint | No | [data-ui-part~='hint'] | Supporting text under the track. |
Attributes
Every value below is implemented by the stylesheets this component ships. Boolean attributes are presence-based: author the attribute with no value, or omit it.
| Attribute | Values | Default | Description |
|---|---|---|---|
data-ui-size | sm · md · lg | md | Track thickness and label size. |
data-ui-density | compact · normal | normal | Internal spacing. |
Styling
Root identity: ui-progress. Required stylesheets: tokens.css, core/progress.css, themes/atmosphere/tokens.css, themes/atmosphere/progress.css.
This component adds no custom properties of its own. Restyle it through the design tokens or your own CSS.
Design tokens this component reads (9)
These are global Atmosphere tokens. Change them once at the theme level rather than per component.
--ui-accent · --ui-bg-control-muted · --ui-fg · --ui-fg-muted · --ui-line · --ui-radius-pill · --ui-space-1 · --ui-space-2 · --ui-space-4
Accessibility
Keep the native elements, roles, and relationships shown in the example. Timeless adds only the state and keyboard coordination the platform does not already provide, and it never supplies your accessible names — those depend on your content.
This component declares no keyboard contract, because it has none of its own: the markup above is native elements and native ARIA, and everything a keyboard or a screen reader does with it comes from the platform. Nothing here manages focus, and nothing here adds a role you did not author. So the accessibility of this component is the accessibility of the markup — which is why the markup is the part worth copying exactly.
Before JavaScript runs
This primitive is CSS only. There is nothing to register and nothing to wait for.
More examples
Open Progress in StoryLite for variants, controls, and manual testing.