Angular Progress, Meter & Ring | ng-hub-ui-metrics

Read-only Angular metric primitives — a linear progress bar, a graded meter and a circular ring gauge — driven by design-system tokens with full ARIA semantics.

API reference

Here's the full contract for metrics: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.

Inputs

Dial metrics in with 21 inputs. Bind them like any Angular @Input.

NameTypeDefaultDescription
hub-progress · valuenumber0Current progress value, expressed on the [0, max] scale.
hub-progress · maxnumber100Upper bound of the progress scale.
hub-progress · indeterminatebooleanfalseRenders a looping bar for work of unknown duration; drops aria-valuenow.
hub-progress · colorHubMetricsColor | undefinedundefinedOptional accent driving the indicator colour: a bareword (semantic name, registered accent or CSS named colour) maps to --hub-sys-color-<name> with the word itself as the fallback, while a literal (#hex, rgb(), oklch(), var()…) is passed through unchanged. Applied inline when set; omit it to let the --hub-progress-accent token drive the accent.
hub-progress · sizeHubProgressSize'md'Size token controlling the bar thickness (sm, md or lg).
hub-progress · showValuebooleanfalseWhether the rounded percentage is rendered next to the bar.
hub-progress · labelstring''Accessible label describing what the progress bar measures.
hub-meter · valuenumber0Current measurement, expressed on the [min, max] scale.
hub-meter · minnumber0Lower bound of the scale.
hub-meter · maxnumber1Upper bound of the scale.
hub-meter · lownumber | undefinedundefinedUpper limit of the "low" region; defaults to min when omitted.
hub-meter · highnumber | undefinedundefinedLower limit of the "high" region; defaults to max when omitted.
hub-meter · optimumnumber | undefinedundefinedPreferred point of the range; defaults to the midpoint when omitted.
hub-meter · labelstring''Accessible label naming what the gauge measures; role=meter takes its name from the author, so the meter is unnamed without it.
hub-ring · valuenumber0Score value, expressed as a 0..1 ratio or a 0..max figure.
hub-ring · maxnumber1Upper bound the value is normalized against.
hub-ring · sizenumber | string | undefinedundefinedOuter diameter of the ring (number is treated as px, or any CSS length string), applied inline when set. Omit it to let the --hub-ring-size token drive the diameter.
hub-ring · thicknessnumber | string | undefinedundefinedStroke width of the ring (number is treated as px, or any CSS length string), applied inline when set. Omit it to let the --hub-ring-thickness token drive the stroke.
hub-ring · thresholdsHubRingThresholds | undefinedundefinedOptional colour thresholds recolouring the indicator by band (low/high).
hub-ring · showValuebooleantrueWhether the rounded percentage is rendered in the centre.
hub-ring · labelstring''Accessible label naming what the ring scores; neither the projected caption nor the centred percentage can name a role=meter.

Outputs

No outputs documented yet.

Templates

Make it yours — 1 template slots let you project custom markup.

NameDescriptionExample
hub-ring · <ng-content>Content projected into the ring centre as a caption, rendered alongside (or instead of) the built-in percentage. It is decoration, not a name: an element with role="meter" is named by its author, so pass the `label` input.<hub-ring [value]="0.82" [thresholds]="{ low: 0.4, high: 0.75 }" label="Quality score">Score</hub-ring>