Metric explorer
ProPick a metric, a split and a range, and see it plotted.
pnpm dlx shadcn@latest add @caliper/metric-explorer| Point | Organic | Paid search | Referral | Event | |
|---|---|---|---|---|---|
| 10-17 | 8526 | 5526 | 3593 | 2225 | |
| 10-18 | 7938 | 6162 | 3697 | 2786 | |
| 10-19 | 7882 | 5327 | 3697 | 2878 | |
| 10-20 | 7734 | 8134 | 3684 | 2620 | |
| 10-21 | 7835 | 8131 | 3964 | 2511 | |
| 10-22 | 8298 | 9779 | 4506 | 3112 | |
| 10-23 | 8407 | 8808 | 4210 | 2827 | |
| 10-24 | 9504 | 9072 | 4101 | 3045 | |
| 10-25 | 9502 | 9017 | 4739 | 2898 | |
| 10-26 | 9806 | 10880 | 4615 | 3339 | |
| 10-27 | 10212 | 9160 | 4934 | 3341 | |
| 10-28 | 10633 | 10809 | 4438 | 3371 | |
| 10-29 | 10506 | 11241 | 5251 | 3026 | |
| 10-30 | 11426 | 11427 | 4608 | 3043 |
| Channel | Total | Share | Trend |
|---|---|---|---|
| Organic | 128k | 36% | |
| Paid search | 123k | 35% | |
| 60.0k | 17% | ||
| Referral | 41.0k | 12% |
When to use #
Use it for
- Self-serve analysis without writing a query.
Skip it when
- A fixed report; use a dashboard.
Installation #
pnpm dlx shadcn@latest add @caliper/metric-explorer
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.
Usage #
Import it from your copy of the source. The example behind the preview comes with the source.
import { MetricExplorer } from "@/components/ui/metric-explorer"
The worked example comes with Pro
The 38-line example behind the preview opens here with a Pro or Team licence.
API reference #
MetricExplorer
component
Accessibility #
It is built on native elements and keeps aria-label, aria-valuetext and aria-hidden in step with state.
Keyboard and focus handling comes from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.
Motion #
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.