Activity heatmap
Activity per day, a column per week, like deploys over a year. Read days by pointer or keys, drag to choose a range, with streaks and weekday totals. Levels follow the spread of the days. No chart library.
| Month | in total | Busiest day |
|---|---|---|
| November 2025 | 103 deploys | Wednesday, November 19, 2025: 11 deploys |
| December 2025 | 117 deploys | Tuesday, December 9, 2025: 11 deploys |
| January 2026 | 119 deploys | Wednesday, January 7, 2026: 9 deploys |
| February 2026 | 82 deploys | Wednesday, February 4, 2026: 7 deploys |
| March 2026 | 105 deploys | Wednesday, March 4, 2026: 8 deploys |
| April 2026 | 153 deploys | Tuesday, April 28, 2026: 11 deploys |
| May 2026 | 148 deploys | Wednesday, May 20, 2026: 11 deploys |
| June 2026 | 118 deploys | Tuesday, June 2, 2026: 10 deploys |
| July 2026 | 93 deploys | Thursday, July 2, 2026: 7 deploys |
| August 2026 | 109 deploys | Wednesday, August 26, 2026: 10 deploys |
| September 2026 | 196 deploys | Tuesday, September 15, 2026: 48 deploys |
| October 2026 | 152 deploys | Wednesday, October 7, 2026: 11 deploys |
| November 2026 | 26 deploys | Wednesday, November 4, 2026: 10 deploys |
Installation
npx shadcn@latest add @quireui/activity-heatmapUsage
<ActivityHeatmap
label="Deploys in the last year"
days={[
{ date: "2026-11-05", value: 6 },
{ date: "2026-11-06", value: 3 },
// ...
]}
unit={{ one: "deploy", other: "deploys" }}
/>Each column is a week and each row a weekday, from the locale's first day; weekStartsOn changes it. Days you leave out count as zero. The grid ends at the latest day you pass, or at to, and starts 52 weeks before it, or at from.
Point at a day, or arrow to it, and the line under the grid reads it, like "Tuesday, September 15, 2026: 48 deploys". The legend's swatches pick out every day at that level.
Levels that one day cannot flatten
A launch, an incident or a big import makes one day far busier than the rest. Levels set by quarters of the busiest day would push almost every other day into the palest two. Here they follow the spread of the days that had any activity: a quarter of them fall in each level, so the year keeps its shape, and the busy day is simply the darkest. The year above has a launch day of 48 deploys against a usual 3 to 8. thresholds sets the levels yourself.
Streaks and weekdays
streaks adds the longest run of active days and the one still running at the end. weekdays adds each weekday's total at the end of its row, the busiest in a stronger ink, so "we ship on Wednesdays" is read off rather than guessed.
Choosing a range
onRangeSelect lets a drag across days, or Shift with the arrow keys and Enter, choose a range, and the line under the grid gives its total while you do. active and onActiveChange share the day being read, so a chart beside it follows the same cursor. Here the range sets the chart, and pointing at either moves both.
| Month | in total | Busiest day |
|---|---|---|
| November 2025 | 103 deploys | Wednesday, November 19, 2025: 11 deploys |
| December 2025 | 117 deploys | Tuesday, December 9, 2025: 11 deploys |
| January 2026 | 119 deploys | Wednesday, January 7, 2026: 9 deploys |
| February 2026 | 82 deploys | Wednesday, February 4, 2026: 7 deploys |
| March 2026 | 105 deploys | Wednesday, March 4, 2026: 8 deploys |
| April 2026 | 153 deploys | Tuesday, April 28, 2026: 11 deploys |
| May 2026 | 148 deploys | Wednesday, May 20, 2026: 11 deploys |
| June 2026 | 118 deploys | Tuesday, June 2, 2026: 10 deploys |
| July 2026 | 93 deploys | Thursday, July 2, 2026: 7 deploys |
| August 2026 | 109 deploys | Wednesday, August 26, 2026: 10 deploys |
| September 2026 | 196 deploys | Tuesday, September 15, 2026: 48 deploys |
| October 2026 | 152 deploys | Wednesday, October 7, 2026: 11 deploys |
| November 2026 | 26 deploys | Wednesday, November 4, 2026: 10 deploys |
| Day | Deploys |
|---|---|
| Sep 12 | 0 |
| Sep 13 | 1 |
| Sep 14 | 6 |
| Sep 15 | 48 |
| Sep 16 | 9 |
| Sep 17 | 9 |
| Sep 18 | 4 |
| Sep 19 | 0 |
| Sep 20 | 1 |
| Sep 21 | 6 |
| Sep 22 | 0 |
| Sep 23 | 9 |
| Sep 24 | 9 |
| Sep 25 | 5 |
| Sep 26 | 0 |
| Sep 27 | 1 |
| Sep 28 | 5 |
| Sep 29 | 10 |
| Sep 30 | 12 |
| Oct 1 | 8 |
| Oct 2 | 5 |
| Oct 3 | 0 |
| Oct 4 | 1 |
| Oct 5 | 7 |
| Oct 6 | 9 |
| Oct 7 | 11 |
| Oct 8 | 7 |
| Oct 9 | 5 |
| Oct 10 | 0 |
| Oct 11 | 1 |
| Oct 12 | 7 |
| Oct 13 | 8 |
| Oct 14 | 0 |
| Oct 15 | 10 |
| Oct 16 | 4 |
| Oct 17 | 0 |
| Oct 18 | 0 |
| Oct 19 | 6 |
| Oct 20 | 10 |
| Oct 21 | 9 |
| Oct 22 | 8 |
| Oct 23 | 3 |
| Oct 24 | 0 |
| Oct 25 | 0 |
| Oct 26 | 5 |
| Oct 27 | 9 |
| Oct 28 | 7 |
| Oct 29 | 7 |
| Oct 30 | 5 |
| Oct 31 | 0 |
| Nov 1 | 1 |
| Nov 2 | 4 |
| Nov 3 | 7 |
| Nov 4 | 10 |
| Nov 5 | 0 |
| Nov 6 | 4 |
In a small space
Cells grow with the space, from 8 to 15 pixels. Narrower than that, the grid scrolls and starts at the newest week; a soft fade on the edge says there is more, and a slim scroll bar shows only on hover or while scrolling. The weekday names stay in view.
| Month | in total | Busiest day |
|---|---|---|
| November 2025 | 103 deploys | Wednesday, November 19, 2025: 11 deploys |
| December 2025 | 117 deploys | Tuesday, December 9, 2025: 11 deploys |
| January 2026 | 119 deploys | Wednesday, January 7, 2026: 9 deploys |
| February 2026 | 82 deploys | Wednesday, February 4, 2026: 7 deploys |
| March 2026 | 105 deploys | Wednesday, March 4, 2026: 8 deploys |
| April 2026 | 153 deploys | Tuesday, April 28, 2026: 11 deploys |
| May 2026 | 148 deploys | Wednesday, May 20, 2026: 11 deploys |
| June 2026 | 118 deploys | Tuesday, June 2, 2026: 10 deploys |
| July 2026 | 93 deploys | Thursday, July 2, 2026: 7 deploys |
| August 2026 | 109 deploys | Wednesday, August 26, 2026: 10 deploys |
| September 2026 | 196 deploys | Tuesday, September 15, 2026: 48 deploys |
| October 2026 | 152 deploys | Wednesday, October 7, 2026: 11 deploys |
| November 2026 | 26 deploys | Wednesday, November 4, 2026: 10 deploys |
Loading and empty
Accessibility
The grid is one tab stop. Its rows are the weekdays and its cells the days, each named with its date and count; the arrow keys move between them and screen readers read the one you are on. The legend's swatches are toggle buttons named by the counts each level holds. A table of the months, with each month's total and busiest day, is read with it.
| Key | Action |
|---|---|
| ↑ / ↓ | Previous or next day |
| ← / → | A week back or forward |
| PageUp / PageDown | Four weeks back or forward |
| Home / End | First or last day |
| Shift + arrows | With onRangeSelect: grows a range from where the cursor was |
| Enter | Chooses the range, or calls onPick with the day |
| Esc | Drops the range, then leaves the day |
Motion
The grid arrives once, rising into place, when it first scrolls into view. When new data arrives, each day's colour eases to its new level, and a level picked in the legend fades the others. Reading a day follows the pointer and the keys without easing.
Activity heatmap or something else?
- A trend over days, where the exact shape matters more than the weekly rhythm: a Chart.
- A short row of days with a status each, like uptime: a Tracker.
API reference
ActivityHeatmap
Activity per day, a column per week, like deploys or signups over a year. Point at a day, or arrow to it, to read it; drag across days to choose a range. Levels follow the spread of the days, so one busy launch day does not turn the rest of the year pale.
Prop
Type
Also takes every <figure> attribute. Style it with [data-slot="activity-heatmap"].
Donutnew
One whole and its parts as a ring, with the total in the middle and a legend of every amount and share. The smallest fold into Other. No chart library.
Trackernew
A row of bars, one per period, in its status's colour, like uptime per day. Works out the uptime, fits the space, reads incidents out, and stacked trackers share one cursor. No chart library.