KpiCard
Metrics & Status

KpiCard

Dashboard stat tile with label, value, optional unit, sub-line, and trailing sparkline.

Props

KpiCard extends CardProps (omitting children).

KpiCardProps props
PropTypeDefaultDescription
labelReactNode—The metric name, shown above the value.
valueReactNode—The headline number or string.
unitReactNode—Small unit label after the value (e.g. GB, %, ms).
subReactNode—Dim line under the value for context.
subTone"default" | "warn""default"Turns the sub line amber when warn.
sparknumber[]—Trend series shown as a trailing sparkline.
sparkColorstring—Override sparkline color.

Examples

Basic KPI

Active users
1234
Basic KpiCard

With spark line

KpiCard with sparkline

With sub

CPU usage
64%
avg across 12 nodes
KpiCard with sub

Sub tone warn

Failed jobs
7
3 above threshold
KpiCard with warn subTone

With unit

Storage
487GB
of 1 TB quota
KpiCard with unit
ImportTSX
import { KpiCard } from "@solarius/onset";
import type { KpiCardProps } from "@solarius/onset";