Back to components
ComponentTableFree

Heatmap Table React component

A cohort retention table coloured like a heatmap: one row per signup month, one column per month after, cells shaded by how many users stayed, a percent / users switch, a weighted average row and a crosshair that compares any cell with the average.

About the Heatmap Table component

Heatmap Table turns a cohort retention table into something you can read at a glance: each signup month is a row, each month after signup is a column, and every cell is shaded by how many of those users were still active, so improving or slipping cohorts stand out immediately.

Switch between percentages and user counts, read the weighted average along the bottom, and hover, tap or arrow through any cell to see how it compares with the average for that month.

When to use it

Use it for product retention, subscription churn, repeat purchase rates, feature adoption over time and any 'what happened to the people who started in month X' question.

For a single retention curve, a line chart is clearer; the table shines when comparing many cohorts.

Installation

Add the Heatmap Table component to your project with the shadcn CLI. It lands in components/heatmap-table.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/heatmap-table

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install clsx tailwind-merge

More Table components

Sparkline Table
Free
Frozen Columns Table
Free
Grouped Rows Table
Free
Expandable Row Table
Free
Live Ticker Table
Free
Spreadsheet Grid
Free