Skip to content
caliper ui pro docs

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.

Pro

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.

From billing events, 1–30 Nov

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

terminal
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
PropTypeDefaultDescription
label *string—
value *string—The current value, already formatted.
change *number—Change against the previous period, as a fraction: -0.12 is down 12%.
periodstring—The comparison, such as “vs last month”.
seriesreadonly number[]—Recent values for the trend line.
insightInsight—
loadingbooleanfalseWhile true the insight line shows a placeholder.
format((value: number) => string)(n) => n.toLocaleString()Formats driver values in the metric's units.
onFeedback((helpful: boolean) => void)—
onDismiss(() => void)—
classNamestring—

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.md

The index of every part is at /llms.txt.

More in Assistant screens