Pro
Heatmap matrix
Two categories against each other, coloured by value. The row and column follow the pointer or arrow keys, and choosing a step of the scale isolates its cells.
pnpm dlx shadcn@latest add @caliper/heatmap-matrixWhen to use
Use it for
- Weekday by hour, feature by plan, error by service.
- Spotting the busy or broken corner of a grid.
Skip it when
- Calendar days over a year; use the activity heatmap.
- Exact comparisons; colour is approximate, so keep the table.
Installation
pnpm dlx shadcn@latest add @caliper/heatmap-matrix
Adds its 3 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. It is built from bucketOf and HeatmapMatrix.
import { bucketOf, HeatmapMatrix } from "@/components/ui/heatmap-matrix"
The worked example comes with Pro
The 29-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
bucketOf
component
No props of its own; it accepts the native props of its root element.
HeatmapMatrix
component
Accessibility
It exposes grid, row, columnheader, rowheader, gridcell and group semantics, with aria-label, aria-busy and aria-pressed kept in step with state.
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.
Related
- Activity heatmapA year of daily activity as a grid, with selection, and a footer that opens a ranked breakdown of where the activity went over the grid.
- Cohort retentionA triangle of retention by sign-up cohort.
- Scatter chartTwo measures per item, with an optional third as point size. Points grow in, hidden groups shrink away, and a trend line with its fit draws after them.