Skip to content
caliper ui docs

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.

Pro
pnpm dlx shadcn@latest add @caliper/heatmap-matrix

Support queue

Weekdays peak from 10:00 to 16:00 UTC; Wednesday 14:00 is missing from the export.

Tickets by weekday and hour (UTC)
000204060810121416182022
Mon
Tue
Wed
Thu
Fri
Sat
Sun
1 tickets
47 tickets
Installs components/ui/heatmap-matrix.tsxDepends on d3-shapeMotion none in component source

When 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

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

example.tsx
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
Checking your licence…

API reference

bucketOf

component

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

HeatmapMatrix

component
PropTypeDefaultDescription
label *string—
rows *readonly string[]—
columns *readonly string[]—
values *readonly (readonly (number | undefined)[])[]—values[row][column]; undefined means no reading.
unitstring""
formatValue((value: number) => string)numberText
stepsnumber5
loadingboolean—
errorstring—
classNamestring—

Accessibility

It exposes grid, row, columnheader, rowheader, gridcell and group semantics, with aria-label, aria-busy and aria-pressed kept in step with state.

KeyBehaviour
→Moves to the next item or value.
←Moves to the previous item or value.
↓Moves to the next item or value.
↑Moves to the previous item or value.
HomeJumps to the first item or the minimum.
EndJumps to the last item or the maximum.
EscapeCloses or cancels, then returns focus to where it came from.

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.

All Distribution charts examples