Skip to main content
PimentCSS v1.0.1, what's new
Home

Progress

Linear bars, labeled progress, and circular indicators.

Linear and circular progress indicators for uploads, form steps, and background tasks. Styles live in scss/components/_progress.scss. Pair with Snackbars for optional timer bars, or Loader when the duration is unknown.

Linear bar

Standalone .progress track with .progress__fill width. Expose role="progressbar" and aria-valuenow when the value is meaningful.

Default track: max-width 256px, height 4px, pill radius. Use .progress--sm for 2px (snackbar timer).

Heights

.progress--sm (2px) for compact timers; default height 4px for page-level feedback.

Medium (4px)

Small (2px)

Progress bar (label + track)

Wrap the track in .progress-bar with a visible .progress-bar__label. The inner bar uses aria-labelledby so the label is the accessible name.

Completion: 25%

Completion: 25%

Progress circle

SVG ring with .progress-circle__track and .progress-circle__fill. Center label is visual only; keep aria-label or aria-valuenow in sync when the value changes.

75%
75%

Medium 128px (label body-large) · Small 64px (label body-medium). Set stroke-dasharray="{value} {remainder}" on .progress-circle__fill with pathLength="100".

Live update

Update aria-valuenow, visible labels, and either .progress__fill width or the circle stroke-dasharray when progress changes in your app.

Linear bar

Completion: 0%

Progress circle

0%

Behavior in your app

Copy docs-site/src/lib/progress-behavior.ts and call wireAllProgress() after load, or update values from your framework when tasks complete.

Class reference

ClassDescription
.progressLinear track (max-width 256px, 4px height)
.progress--sm2px height (snackbar timer, compact UI)
.progress__fillFilled portion; set width or animate in JS
.progress-barLabel + track column (max-width 512px)
.progress-bar--sm / --mdBar height token on nested .progress
.progress-bar__labelVisible status text; pair with aria-labelledby
.progress-circleCircular indicator (128px default)
.progress-circle--sm64px ring + body-medium label
.progress-circle__svgRotated SVG host for track and fill arcs

Customize (Sass)

  1. Progress layout

    Override track width, bar heights, and circle sizes before importing components.
    @use "pimentcss-design-system" with (
      $progress-width: 20rem,
      $progress-height-md: 6px,
      $progress-circle-md: 9rem
    );
  2. Rebuild CSS

    Run after editing _progress.scss.
    npm run build:css

Accessibility (RGAA / WCAG)

Progress indicators

  • Role, use role="progressbar" with aria-valuenow, aria-valuemin, and aria-valuemax when the value is known.
  • Name, provide aria-label or aria-labelledby (compound .progress-bar uses the visible label).
  • Indeterminate, omit aria-valuenow or use aria-busy="true" on a parent region; prefer Loader when percent is unknown.
  • Decorative timers, snackbar countdown bars can use aria-hidden="true" if remaining time is not the only cue (see Snackbar).

Next steps