Scorecard
one KPI with label, value, optional delta/trend/hint/badge
A compact card of what moved in a period: each metric before → after, with its delta.
A compact “what moved” card: a headline sentence, then before → after, a delta and a why per metric.
The narrated month, grouped by sentiment. Colour follows the sentiment set per metric, not the direction. Variants shows other data sets.
Growth came from upgrades and the annual offer; Starter churn doubled after the Oct 28 price change.
Each metric sets its own sentiment: churn going down is good. The word good, bad or neutral is always visible, and each row reads as one sentence to screen readers. Lead with summary, group with groupBy sentiment and give each row a short why (no trailing period). onAsk adds an Ask in Chat Button. Use Scoreboard for a row of KPIs and LineChart for a series.
A compact "what moved" card for a period: each metric shows before → after and a delta. Good and bad are set per metric (churn down is good), and direction and sentiment are always spelled out. An optional summary sentence leads, rows can be grouped into Better and Worse, and each row can carry a one-line why.
import { ChangeSummary } from "agentic-ds-kit";From contracts/changesummary.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| title | string | No | What moved | — |
| period | string | No | — | e.g. "Oct → Nov 2026" |
| items | array | Yes | — | { id, label, before, after, delta, direction: 'up'|'down'|'flat', sentiment?: 'good'|'bad'|'neutral', why?: string }[] — values are pre-formatted strings; why is a one-line caption with no trailing period. |
| summary | string | No | — | The headline sentence above the rows. With no items it stands alone (a quiet month) instead of the Empty state. |
| groupBy | sentiment | No | — | sentiment groups rows into Better, Worse and Steady, each with a count in a kit Badge. Default: one flat list. |
| onViewAll | function | No | — | Renders an outline neutral sm Button. |
| viewAllLabel | string | No | View full report | — |
| onAsk | function | No | — | Adds a neutral outline sm Button "Ask in Chat" with the MessageCircle icon, e.g. to open Chat on this period. |
| emptyTitle | string | No | Nothing to compare yet | — |
| emptyDescription | string | No | — | — |
| loading | boolean | No | false | — |
| error | string | No | — | — |
| onRetry | function | No | — | — |
one KPI with label, value, optional delta/trend/hint/badge
Metrics strip of kit Scorecards: two to six figures, and the only metric picker.
Change and progress over ordered samples as a line or area chart.
Placeholder when a list, page, or region has nothing to show.