Skip to content
Alpha

Hololink UI is under active development. Components, APIs and these docs may change without notice.

Holo Progress

The <holo-progress> component renders a role="progressbar" bar with either a determinate value or an indeterminate (unknown-duration) animation.

Use it for:

  • Showing how far a measurable task has got: an upload, an import, a multi-step process.
  • An indeterminate bar when you know work is running but not how much remains (indeterminate).

Don’t use it for:

  • Showing a spinner for short, compact waits. Use Spinner.
  • Page placeholders while content loads. Use Skeleton.
  • Values the user can change. Use Slider.
<holo-progress label="Upload progress" value="40" max="100"></holo-progress>
<holo-progress label="Loading" indeterminate></holo-progress>

The host has role="progressbar" with aria-label from the label prop. In determinate mode it sets aria-valuemin="0", aria-valuemax (the max prop) and aria-valuenow (clamped to max). In indeterminate mode it omits all three, so assistive technology treats the progress as unknown. The component is not interactive.

  • Progress is not announced as it changes. The role is not a live region, and screen readers usually do not read updates unprompted.
  • The width transition and the indeterminate animation only run when prefers-reduced-motion: no-preference. With reduced motion, the indeterminate bar does not animate.

You provide:

  • A label that says what is progressing (“Uploading report”). Without it the bar has no accessible name.
  • Visible percentage or status text if users need the number, and a live region (for example Alert or a role="status" element) to announce completion.

Importing

import '@philbob/hololink-ui/holo-progress';

Properties

PropertyAttributeTypeDefaultDescription
indeterminateindeterminatebooleanfalseIf true, renders an indeterminate (busy, unknown-duration) progress bar and omits aria-valuenow.
labellabelstring | undefined—The accessible label describing what is progressing.
maxmaxnumber100The maximum progress value.
valuevaluenumber | undefined—The current progress value. Omit (or set indeterminate) when the duration of the task is unknown.

CSS custom properties

PropertyDescription
--holo-progress-fill-bgColor of the filled portion of the track.
--holo-progress-radiusCorner radius of the track.
--holo-progress-track-bgBackground color of the unfilled track.
--holo-progress-track-heightHeight of the progress track.