ComponentStandalone

Progress

Horizontal progress bar with theme colors and an animated fill.

Installation

import { WrProgress } from 'ngwr/progress';

@Component({ imports: [WrProgress] })
export class MyComponent {}

Basic usage

<wr-progress [value]="42" />

Colors

<wr-progress color="success" [value]="80" />

Interactive

Bar width animates between changes.

35
<wr-progress [value]="value()" />
<wr-slider [(value)]="value" />

API

NameDescriptionTypeDefault
ariaLabelAccessible name — role="progressbar" needs one. Falls back to progress.label.string | nullnull
colorBar color.WrColor'primary'
valueProgress value, clamped to [0, 100].number0

CSS variables

Custom properties ngwr/progress publishes. Each default below is declared on the component's own selector, so a :root override is shadowed by it — set them on that selector, on a wrapper you scope yourself, or inline on the element. Unlike the BEM class names, these are the supported way to restyle the component.

VariableDefaultDeclared on
--wr-progress-barvar(--wr-color-primary).wr-progress +1 variant override
--wr-progress-height0.5rem.wr-progress
--wr-progress-radiusvar(--wr-border-radius-pill).wr-progress
--wr-progress-trackvar(--wr-color-fill).wr-progress +1 variant override