Skip to main content
Renders one labelled number, with an optional change against the previous period.

Parameters

__namedParameters

TapStatProps

Returns

ReactElement

Remarks

The label is uppercased in --fg-muted and the number uses tabular figures, so a row of stats stays aligned as values change. delta is a ratio, not a percentage: it renders as whole percent with a plus in front when it is above zero, and is coloured --tap-danger below zero and --tap-accent at or above it. Format value yourself with tap.format.number or tap.format.currency, so it follows the owner’s locale.

Example