Skip to content

Heatmap Card

A card around the heatmap: a headline total with its change, a period switch where each range has its own data, and a headline that follows the cell you point at.

On this page
Used for
  • A week of agent activity by hour
  • Support load by weekday
  • Cost by region and month
  • Any dashboard card that pairs a total with where it happens

Examples

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

title / icon
string / ReactNode
Defaultrequired / -
The card title and an optional 16px mark before it.
rows / columnsrequired
string[]
The two axes, shared by every period.
periodsrequired
HeatmapPeriod[]
{ id, label, values, delta, caption? } per range: its own grid and its own change (a fraction: 0.082 is +8.2%).
period / defaultPeriod / onPeriodChange
string
Defaultfirst period
Controlled or kept by the card.
unit
string
The thing counted, after the headline: runs.
format
(n) => string
Defaultgrouped integers
A value as text for the headline, the legend and screen readers.
cellLabel
(row, column, columnEnd) => string
Defaultrow, column
The line under the headline while a cell is active. columnEnd is the last column of a merged cell.
narrow
{ bucket, below?, columnLabelEvery? } | false
Defaultpairs under 480 px
Merge columns on a narrow card so the whole range shows without scrolling. false keeps every column.
goodWhen
"up" | "down"
Default"up"
down when a fall is good news: cost, errors.
columnLabelEvery / gridLabel
number / string
Default1 / title
Passed to the grid.
Motion
180 ms ease-out
A period switch fades the cells in once from 20% opacity, and the headline rolls. Nothing plays on first render or with reduced motion.

What it handles

  1. 01Shows the total with its change, and swaps the headline to the value of the cell you point at or focus, with the digits rolling.
  2. 02Carries one dataset and one change per period, so the 7, 30 and 90 day views are real, not rescaled.
  3. 03Fades the cells in once when the period changes, and plays nothing on first render or with reduced motion.
  4. 04Turns the change green when it moves the good way, with goodWhen="down" for cost and errors.
  5. 05Keeps the grid keyboard friendly: one tab stop, arrow keys, and each cell read out with its row, column and value.

States

Period switch
The cells fade in from 20% opacity, the headline rolls to the new total
180ms, ease-out, then 280ms roll
Point or focus a cell
The headline shows that cell's value and its time, the change hides
280ms digit roll
First render
Nothing plays
none
Reduced motion
The period and the headline change at once
0ms

Works with

When to use

When to use

  • A dashboard card that pairs a total and its change with where it happens, over a week, a month or a quarter.
  • A headline that should follow the cell the person points at.

When not to use

  • The bare grid with no card around it: use Heatmap.
  • Several live metric cards at once: use Live Metrics.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Heatmap Card to my app and wire it to my own data.
  • I need a dashboard card that pairs a total and its change with where it happens, over a week, a month or a quarter. Set that up with the Knowns UI Heatmap Card.
  • Which Heatmap Card props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "heatmap-card" }) and search_docs({ query: "heatmap card" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Heatmap Card, or found something off? We read every message.