KPIStat
One point-in-time metric and what it changed by — a fixed shape, not a smaller Card, and not a number measured against a cap.
Default
A label and a number is the whole legal shape — everything else is optional. Values use tabular figures so a row of them lines up.
Usage
import { KPIStat } from '@oceanic-hub/brand-system'deltaPositive overrides the sign, and reaching for it is the point: the default
reads the leading - and calls it bad, which is wrong for "fewer failed runs". Pass it
wherever the arithmetic and the meaning disagree.
Oceanic-only, and shadcn's card in your table is a nearest relative at best, not a
counterpart to pair against: Card is a generic bounded surface with a header, a footer and
arbitrary content — upstream's own examples are a login form and a terms-of-service panel — and
KPIStat is one fixed shape, a label over a number, that never grows a footer or an arbitrary
child. A reader who wants a bounded surface for something other than a single metric reaches for
Card instead; this component is not a smaller Card, it is a different job.
If the number is usage against a cap rather than a point-in-time reading — spend, seats, a
quota — reach for SpendBar instead: it takes its capState from the product rather than
inferring "near" or "over" from the two numbers at all, which is the same judgement
deltaPositive lets you make here — except there it is the only way to say it, and here it is
an override.
When down is good
deltaPositive overrides which fill the chip takes; it never touches the arrow. The median build's -8% still draws a DOWN arrow — the number fell, and an arrow's only job is to say which way — while the fill goes done, because deltaPositive says a fall is welcome here. Direction and semantics are two questions; pass deltaPositive wherever their answers disagree, and the glyph never lies about which way the number actually moved.
With a trend
sparkline takes the raw series and colours the trace by the same polarity as the delta — done or stuck — and carries no label of its own, so a screen reader is not told the metric twice. cap adds a budget context line alongside it, e.g. "of €1,000".
The dense scale, and a line of provenance
size="sm" sets the value in DM Mono at text-lg and the label in the eyebrow treatment, for a row of tiles sitting above a mono table — a proportional face aligns digits inside one string and never across two tiles, which is the whole reason the axis exists. note adds a line UNDER the value saying where the number came from; cap stays what it is, an allowance line beside the delta. Three tiles in a row keep their baselines because the value's box is the same at a given size whether the other lines are there or not.
A comparative caption
comparisonCaption names the window a delta compares against — a report showing a rolling 30 days should not have to fight the tile's own hardcoded "vs prev." Omit it and the tile renders exactly what it always has.
API Reference
See the KPIStat API page for every prop of every part, with types, defaults and the contract that pins them.