AI insight card
A metric with the reason it moved, written by AI. The number and its trend come first, one line says what drove the change, and “Why it moved” opens the drivers as bars that push up or pull down. Readers can rate the insight or dismiss it.
Monthly recurring revenue
$46.3kDown 12% vs October
Most of the drop is Starter churn after the November price change; Team and Enterprise held steady.
When to use
- Dashboards where a change matters more than the number, such as revenue, churn or conversion.
- Weekly reports that should explain themselves to people who did not build them.
When not to use
- Metrics that barely move; an explanation of noise misleads.
- Exact accounting figures, where an estimate of drivers is not good enough.
Installation
pnpm dlx shadcn@latest add @caliper/ai-insight-card
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
AiInsightCard
11 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes group and status semantics, with aria-labelledby, aria-hidden, aria-label, aria-busy, aria-expanded and aria-controls kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/ai-insight-card.mdThe index of every part is at /llms.txt.