Skip to content
caliper ui pro docs

KPI drilldown

A KPI that opens into a breakdown by segment.

Pro

Revenue, October

$184,300up 12.4%+$20,400 vs September

Most of the increase came from Paid search (+$11,800).

Previous
$163,900
Explained
+$20,400

When to use

  • Users ask why a number moved.

When not to use

  • There are no segments to break down.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/kpi-drilldown

Adds its 7 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

KpiDrilldown

12 props
PropTypeDefaultDescription
label *string—
value *number—
previous *number—
format((n: number) => string)(n) => n.toLocaleString("en-US")
prefixstring—Unit before and after the rolling headline figure, e.g. "$". Other figures use `format`.
suffixstring—
goodWhen"up" | "down""up"
periodstring"vs last period"How the comparison reads after the change, e.g. "vs September".
views *readonly DrillView[]—
loadingbooleanfalse
errorstring—
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes status semantics, with aria-labelledby, aria-busy, aria-hidden, aria-expanded and aria-pressed 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/kpi-drilldown.md

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

More in Metrics