Display headline KPIs with metric() (including optional delta indicators, sparklines, and target benchmarks) and group multiple metrics in a responsive row with stat_group().
metric()
stat_group()
<ComponentPreview title="Stat Group with Sparklines">
{
"type": "stat_group",
"stats": [
{"type": "metric", "label": "Active Users", "value": "1,420", "delta": "+12.4%", "sparkline": [980, 1060, 1180, 1290, 1340, 1420]},
{"type": "metric", "label": "P95 Latency", "value": "118 ms", "delta": "-14 ms", "sparkline": [148, 140, 132, 126, 121, 118]},
{"type": "metric", "label": "Token Spend", "value": "$312", "delta": "+4%", "caption": "Monthly budget $500"}
]
}
</ComponentPreview>
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML">
</Tabs>
| Component | Parameter | Description |
|---|---|---|
| metric | label, value, delta, delta_color, sparkline, benchmark, caption, help | Single KPI tile with optional trend badge, sparkline series, and helper tooltip. |
metric
label
value
delta
delta_color
sparkline
benchmark
caption
help
| stat_group | stats | Responsive grid wrapper accepting a list of metric() dicts. |
stat_group
stats