Skip to main content

Stat

Interactive

See Stat in Storybook for every variant, with live controls.

A single headline metric, with an optional change and inline trend.

import { Stat } from "@kairosis/eidos";

<Stat
label="Runs today"
value="1,284"
icon="play"
delta="+12% vs last week"
deltaTone="positive"
trend={[12, 18, 14, 22, 27, 36]}
/>;

Props

PropTypeDefaultDescription
labelReactNodeRequired. Uppercase mono meta-label
valueReactNodeRequired. The figure, always mono
deltaReactNodeChange copy, e.g. "+12% vs last week"
deltaTone"neutral" | "positive" | "negative""neutral"Colours the delta
trendnumber[]Renders an inline Sparkline
trendColorstringvar(--primary)
iconIconNameSmall glyph before the label

Guidelines

  • deltaTone is about good/bad, not up/down. A rising failure rate is negative even though the number went up — pass the tone deliberately rather than deriving it from the sign.
  • Write the delta with its comparison baked in ("+12% vs last week"); a number with no baseline means nothing.
  • value is mono with tabular figures, so it doesn't jitter as it updates.
  • Pre-format value — Stat doesn't do locale or unit formatting.
  • Write label in sentence case; CSS uppercases it.