Skip to main content
Version: latest
Works everywhere

ProgressBar works in both server and client environments. Always use the standard import (e.g. @prokodo/ui/progress-bar) — the library detects the runtime automatically.

ProgressBar

ProgressBar renders a horizontal progress indicator. Supports determinate (known progress), indeterminate (unknown progress), and stepped/segmented modes.

Live demo →

Overview

import { ProgressBar } from "@prokodo/ui/progress-bar"
;<ProgressBar value={65} max={100} label="Upload progress" />

Import

import { ProgressBar } from "@prokodo/ui/progress-bar"

CSS:

import "@prokodo/ui/progress-bar.css"

Props

PropTypeDefaultRequiredDescription
idstringHTML id linking label to progress element.
valuenumber0Progress value (0–100).
labelstringAccessible label text.
hideLabelbooleanfalseVisually hide the label (still accessible).
infinitybooleanfalseShow indeterminate / infinite progress animation.
animatedbooleantrueAnimate the progress bar fill.
colorVariantsAccent color variant.
classNamestringCSS class on root element.

See src/components/progress-bar/ProgressBar.model.ts for the full ProgressBarProps type.


Design Tokens

Customise via CSS custom properties on :root or a scoped ancestor.

TokenDefaultDescription
--pk-progressbar-track-bgvar(--pk-color-surface-raised)Track background
--pk-progressbar-radius0.75remTrack border-radius
--pk-progressbar-height1remTrack height
--pk-progressbar-shadowvar(--elevation-2)Track box-shadow
--pk-progressbar-label-size0.875remLabel font-size

AIC Note

Use the standard import path in application code:

import { ProgressBar } from "@prokodo/ui/progress-bar"

No separate /client or /lazy import selection is required in consumer code.

AIC components also support a priority flag for critical above-the-fold elements. This is most visible on Image (native preloading via <link rel="preload"> for above-the-fold content).


WCAG 2.2 Status

CriterionNameStatusNote
1.3.1Info and Relationships (A)✅ FulfilledSemantic structure (headings, lists, labels, landmarks) must be conveyed programmatically via HTML or ARIA.
4.1.2Name, Role, Value (A)✅ FulfilledName, role, and state of all interactive UI components must be programmatically determinable via native HTML semantics or ARIA.
4.1.3Status Messages (AA)✅ FulfilledStatus messages (loading, success, error, progress) must reach assistive technologies without a focus change (aria-live or role='status').

Test coverage: 3 jest-axe assertion(s) across 4 test file(s) · 4 ARIA attribute occurrence(s) in source scan. Criteria marked 🔍 require manual verification in the final product integration and theme context.

Storybook

👉 Open ProgressBar in Storybook


Source

src/components/progress-bar/ProgressBar.model.ts