Progress

A bar that shows how far a task has got.

Installation

Import the class, and @use the entry point in your global styles: without it the component renders unstyled.

import { Component } from '@angular/core';
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

value runs from 0 to 100, and the bar animates each change.

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

Set these on the component's selector or a wrapper, not on :root: the defaults are declared on ngwr/progress's own element.

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

See also