Skip to content
caliper ui pro docs

Metrics dashboard

A connected strip of KPIs; choose one to see the period against the one before and its target.

Pro
Compared with the previous 30 days

Revenue · last 30 days

Daily revenue against the same days last period. The Q4 target is $6,600 a day.

When to use

  • The top of an overview page.

When not to use

  • Only one number matters; use a stat card.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/metrics-dashboard

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

MetricsDashboard

9 props
PropTypeDefault
metrics *readonly KpiMetric[]—
range *string—
rangesreadonly { value: string; label: string; }[][{ value: "7d", label: "7 days" }, { value: "30d", label: "30 days" }, { value: "90d", label: "90 days" }]
onRangeChange *(range: string) => void—
selectedstring | null—
onSelect((id: string) => void)—
loadingboolean—
errorstring—
classNamestring—

Delta

3 props
PropTypeDefault
value *number—
goodWhen"up" | "down""up"
comparestring"vs previous period"

deltaTone

0 props

No props of its own; it accepts the native props of its root element.

Keyboard

→
Moves to the next item or value.

Accessibility

It exposes img, status and alert semantics, with aria-hidden, aria-label, aria-busy 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/metrics-dashboard.md

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

More in Metrics