A calendar grid of shaded days for showing activity
Point at a day; ← → a week, ↑ ↓ a day, Enter keeps it
pnpm dlx shadcn@latest add @notchset-pro/activity-heatmapHow often something happened, one cell a day, its total on one line.
Every shadcn style · one file
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { ActivityHeatmap } from "@/components/ui/notchset/activity-heatmap";
import { useLessMotion } from "@/lib/notchset/motion";
import { dayMs, useToday } from "./today";
import { useSelfPlay } from "./self-play";
/*
* Six months of one person's focus sessions, in the wash: one colour's soft steps, never a solid tile. On view the
* cells come in once like a tide, a diagonal swell from the oldest week to today; then the busiest day of the last
* month lights with its week and the line reads it. Then the hand: point, arrows, Enter keeps a day. A phone shows the
* last quarter at the same air.
*/
/* six months of weeks */
const WEEKS = 26;
const MON = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const DOW = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
/* a steady, seeded pattern: busier mid-week, quiet weekends, a holiday in August, a stronger autumn */
function seeded(n: number) {
const x = Math.sin(n * 12.9898) * 43758.5453;
return x - Math.floor(x);
}
/* the six months end with the week of the real today (its Sunday); days still to come are empty */
function build(today: string) {
const t = dayMs(today);
const END = new Date(t + (6 - ((new Date(t).getUTCDay() + 6) % 7)) * 864e5);
const START = new Date(END.getTime() - (WEEKS * 7 - 1) * 864e5);
const weeks: number[][] = [];
const labels: string[][] = [];
for (let w = 0; w < WEEKS; w++) {
const wk: number[] = [];
const lb: string[] = [];
for (let d = 0; d < 7; d++) {
const day = new Date(START.getTime() + (w * 7 + d) * 864e5);
const r = seeded(w * 7 + d + 3);
const weekend = d >= 5;
const holiday = day.getUTCMonth() === 7 && day.getUTCDate() >= 10 && day.getUTCDate() <= 23;
const season = 0.75 + (w / WEEKS) * 0.6;
let v = weekend ? (r > 0.72 ? 1 + Math.floor(r * 2) : 0) : Math.round((1 + r * 4 + (d === 1 || d === 2 ? 1.5 : 0)) * season);
if (holiday) v = r > 0.85 ? 1 : 0;
if (!weekend && r < 0.06) v = 0;
if (day.getTime() > t) v = 0;
wk.push(v);
lb.push(`${DOW[d]} ${day.getUTCDate()} ${MON[day.getUTCMonth()]}`);
}
weeks.push(wk);
labels.push(lb);
}
/* a month owns a column when the week's last day falls in it */
const months: { label: string; weeks: number; year?: string }[] = [];
for (let w = 0; w < WEEKS; w++) {
const last = new Date(START.getTime() + (w * 7 + 6) * 864e5);
const m = MON[last.getUTCMonth()]!;
const top = months.at(-1);
if (top && top.label === m) top.weeks++;
else months.push({ label: m, weeks: 1 });
}
/* the last 13 weeks' months */
const quarter: { label: string; weeks: number }[] = [];
for (let w = WEEKS - 13; w < WEEKS; w++) {
const m = MON[new Date(START.getTime() + (w * 7 + 6) * 864e5).getUTCMonth()]!;
const top = quarter.at(-1);
if (top && top.label === m) top.weeks++;
else quarter.push({ label: m, weeks: 1 });
}
/* the day the arrival lights: the busiest weekday of the last month, up to today */
let best = [WEEKS - 5, 0];
for (let w = WEEKS - 5; w < WEEKS; w++) for (let d = 0; d < 5; d++) if (weeks[w]![d]! > weeks[best[0]!]![best[1]!]!) best = [w, d];
return { weeks, labels, months, quarter, light: best as [number, number] };
}
export default function ActivityHeatmapDemo() {
const root = React.useRef<HTMLDivElement>(null);
const [narrow, setNarrow] = React.useState(false);
React.useEffect(() => {
const el = root.current;
if (!el || typeof ResizeObserver === "undefined") return;
const ro = new ResizeObserver(() => setNarrow(el.clientWidth < 600));
ro.observe(el);
return () => ro.disconnect();
}, []);
const day = useToday("2026-11-15");
const DATA = React.useMemo(() => build(day), [day]);
const LIGHT = DATA.light;
const from = narrow ? WEEKS - 13 : 0;
/* once the tide has come in, one day lights with its week and the line reads it */
const play = useSelfPlay(root, { beats: [1300], off: useLessMotion() });
React.useEffect(() => {
if (play.step !== 0) return;
const el = root.current?.querySelector<HTMLElement>(`[data-day="${LIGHT[0] - from}-${LIGHT[1]}"]`);
el?.dispatchEvent(new PointerEvent("pointerover", { bubbles: true, pointerType: "mouse" }));
// eslint-disable-next-line react-hooks/exhaustive-deps -- once, on its step
}, [play.step, play.taken]);
return (
<div ref={root} onPointerDownCapture={play.handOver} onKeyDownCapture={play.handOver} className="w-[880px] max-w-full">
<ActivityHeatmap
look="wash"
weeks={DATA.weeks.slice(from)}
labels={DATA.labels.slice(from)}
months={narrow ? DATA.quarter : DATA.months}
label={narrow ? "Focus sessions, the last quarter" : "Focus sessions, the last six months"}
period={narrow ? "in the last quarter" : "in the last six months"}
unit={(n) => `${n} ${n === 1 ? "session" : "sessions"}`}
size="fit"
readout
/>
</div>
);
}"use client";
import * as React from "react";
import { ActivityHeatmap } from "@/components/ui/notchset/activity-heatmap";
import { useLessMotion } from "@/lib/notchset/motion";
import { dayMs, useToday } from "./today";
import { useSelfPlay } from "./self-play";
/*
* Six months of one person's focus sessions, in the wash: one colour's soft steps, never a solid tile. On view the
* cells come in once like a tide, a diagonal swell from the oldest week to today; then the busiest day of the last
* month lights with its week and the line reads it. Then the hand: point, arrows, Enter keeps a day. A phone shows the
* last quarter at the same air.
*/
/* six months of weeks */
const WEEKS = 26;
const MON = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const DOW = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
/* a steady, seeded pattern: busier mid-week, quiet weekends, a holiday in August, a stronger autumn */
function seeded(n: number) {
const x = Math.sin(n * 12.9898) * 43758.5453;
return x - Math.floor(x);
}
/* the six months end with the week of the real today (its Sunday); days still to come are empty */
function build(today: string) {
const t = dayMs(today);
const END = new Date(t + (6 - ((new Date(t).getUTCDay() + 6) % 7)) * 864e5);
const START = new Date(END.getTime() - (WEEKS * 7 - 1) * 864e5);
const weeks: number[][] = [];
const labels: string[][] = [];
for (let w = 0; w < WEEKS; w++) {
const wk: number[] = [];
const lb: string[] = [];
for (let d = 0; d < 7; d++) {
const day = new Date(START.getTime() + (w * 7 + d) * 864e5);
const r = seeded(w * 7 + d + 3);
const weekend = d >= 5;
const holiday = day.getUTCMonth() === 7 && day.getUTCDate() >= 10 && day.getUTCDate() <= 23;
const season = 0.75 + (w / WEEKS) * 0.6;
let v = weekend ? (r > 0.72 ? 1 + Math.floor(r * 2) : 0) : Math.round((1 + r * 4 + (d === 1 || d === 2 ? 1.5 : 0)) * season);
if (holiday) v = r > 0.85 ? 1 : 0;
if (!weekend && r < 0.06) v = 0;
if (day.getTime() > t) v = 0;
wk.push(v);
lb.push(`${DOW[d]} ${day.getUTCDate()} ${MON[day.getUTCMonth()]}`);
}
weeks.push(wk);
labels.push(lb);
}
/* a month owns a column when the week's last day falls in it */
const months: { label: string; weeks: number; year?: string }[] = [];
for (let w = 0; w < WEEKS; w++) {
const last = new Date(START.getTime() + (w * 7 + 6) * 864e5);
const m = MON[last.getUTCMonth()]!;
const top = months.at(-1);
if (top && top.label === m) top.weeks++;
else months.push({ label: m, weeks: 1 });
}
/* the last 13 weeks' months */
const quarter: { label: string; weeks: number }[] = [];
for (let w = WEEKS - 13; w < WEEKS; w++) {
const m = MON[new Date(START.getTime() + (w * 7 + 6) * 864e5).getUTCMonth()]!;
const top = quarter.at(-1);
if (top && top.label === m) top.weeks++;
else quarter.push({ label: m, weeks: 1 });
}
/* the day the arrival lights: the busiest weekday of the last month, up to today */
let best = [WEEKS - 5, 0];
for (let w = WEEKS - 5; w < WEEKS; w++) for (let d = 0; d < 5; d++) if (weeks[w]![d]! > weeks[best[0]!]![best[1]!]!) best = [w, d];
return { weeks, labels, months, quarter, light: best as [number, number] };
}
export default function ActivityHeatmapDemo() {
const root = React.useRef<HTMLDivElement>(null);
const [narrow, setNarrow] = React.useState(false);
React.useEffect(() => {
const el = root.current;
if (!el || typeof ResizeObserver === "undefined") return;
const ro = new ResizeObserver(() => setNarrow(el.clientWidth < 600));
ro.observe(el);
return () => ro.disconnect();
}, []);
const day = useToday("2026-11-15");
const DATA = React.useMemo(() => build(day), [day]);
const LIGHT = DATA.light;
const from = narrow ? WEEKS - 13 : 0;
/* once the tide has come in, one day lights with its week and the line reads it */
const play = useSelfPlay(root, { beats: [1300], off: useLessMotion() });
React.useEffect(() => {
if (play.step !== 0) return;
const el = root.current?.querySelector<HTMLElement>(`[data-day="${LIGHT[0] - from}-${LIGHT[1]}"]`);
el?.dispatchEvent(new PointerEvent("pointerover", { bubbles: true, pointerType: "mouse" }));
// eslint-disable-next-line react-hooks/exhaustive-deps -- once, on its step
}, [play.step, play.taken]);
return (
<div ref={root} onPointerDownCapture={play.handOver} onKeyDownCapture={play.handOver} className="w-[880px] max-w-full">
<ActivityHeatmap
look="wash"
weeks={DATA.weeks.slice(from)}
labels={DATA.labels.slice(from)}
months={narrow ? DATA.quarter : DATA.months}
label={narrow ? "Focus sessions, the last quarter" : "Focus sessions, the last six months"}
period={narrow ? "in the last quarter" : "in the last six months"}
unit={(n) => `${n} ${n === 1 ? "session" : "sessions"}`}
size="fit"
readout
/>
</div>
);
}"use client";
import * as React from "react";
/*
* The real today, for every demo that shows a date: a calendar always opens on the latest day. A demo's data is written around its own anchor day; `useDays(anchor)` moves
* every date by the distance from that anchor to the visitor's today, so "in 3 days" stays in 3 days and today is
* the real today.
*
* Hydration: the server and the hydrating pass render each demo at its own anchor (the text in the server's HTML);
* the client then reads its own clock and moves the dates, so nothing differs while hydrating.
*
* The one switch, ANCHOR mode or a pinned day, wins over the clock: `pinToday("anchor" | "YYYY-MM-DD" | null)` in
* code, or `window.__NS_TODAY__` set before the page runs (the visual gate sets "anchor", so its pictures hold:
* scripts/lib/ui-check-cache.mjs). Under vitest (NODE_ENV "test") it is "anchor": every demo reads its own dates.
*/
export const STABLE_TODAY = "2026-11-16";
export const DAY_MS = 86_400_000;
/** the switch's value that holds every demo at the day its data was written around */
export const ANCHOR = "anchor";
let pinned: string | null = null;
/** the switch: "anchor", a day ("YYYY-MM-DD"), or null to follow the clock again */
export function pinToday(day: string | null) {
pinned = day;
}
// read off globalThis: a Vite install has no Node types
const testing = () => (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV === "test";
function frozen(): string | null {
const w = (globalThis as { __NS_TODAY__?: unknown }).__NS_TODAY__;
return pinned ?? (typeof w === "string" ? w : null) ?? (testing() ? ANCHOR : null);
}
const pad = (n: number) => String(n).padStart(2, "0");
/** the visitor's today in their own zone, as "YYYY-MM-DD" (or ANCHOR when the switch holds the demos still) */
export function readToday(): string {
const f = frozen();
if (f) return f;
const d = new Date();
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
}
/* a day key to its UTC midnight, and back */
export const dayMs = (day: string) => Date.UTC(+day.slice(0, 4), +day.slice(5, 7) - 1, +day.slice(8, 10));
export const dayKey = (ms: number) => new Date(ms).toISOString().slice(0, 10);
/** whole days from a to b */
export const daysBetween = (a: string, b: string) => Math.round((dayMs(b) - dayMs(a)) / DAY_MS);
/* a check once a minute catches midnight (none while the switch holds the day) */
const subscribe = (f: () => void) => {
if (frozen()) return () => {};
const t = setInterval(f, 60_000);
return () => clearInterval(t);
};
const serverToday = () => ANCHOR;
/* "YYYY-MM-DD", or ANCHOR on the server, while hydrating and under the switch */
const useClockDay = () => React.useSyncExternalStore(subscribe, readToday, serverToday);
/** today as "YYYY-MM-DD", for a demo with no dates of its own: `anchor` on the server, while hydrating and under
* the switch, then the visitor's own */
export function useToday(anchor = STABLE_TODAY): string {
const day = useClockDay();
return day === ANCHOR ? anchor : day;
}
export type Days = {
/** today, "YYYY-MM-DD" */
today: string;
/** today's UTC midnight */
todayMs: number;
/** days the anchor moved */
delta: number;
/** a "YYYY-MM-DD" (or a longer ISO stamp; its time is kept) written around the anchor, moved to the real today */
day: (iso: string) => string;
/** a moment written around the anchor (ms), moved by whole days */
ms: (at: number) => number;
};
export function shiftBy(today: string, anchor: string, weeks = false): Days {
const raw = daysBetween(anchor, today);
/* `weeks`: move by whole weeks so every date keeps its weekday (a week of meetings stays Monday to Friday): the
anchor's Monday-to-Sunday week lands on today's */
const delta = weeks ? Math.floor((raw + ((new Date(dayMs(anchor)).getUTCDay() + 6) % 7)) / 7) * 7 : raw;
return {
today,
todayMs: dayMs(today),
delta,
day: (iso) => (/^\d{4}-\d\d-\d\d/.test(iso) ? dayKey(dayMs(iso) + delta * DAY_MS) + iso.slice(10) : iso),
ms: (at) => at + delta * DAY_MS,
};
}
/** dates written around `anchor` (the demo's own today), moved so the anchor lands on the real today */
export function useDays(anchor: string, opts: { weeks?: boolean } = {}): Days {
const today = useToday(anchor);
const weeks = !!opts.weeks;
return React.useMemo(() => shiftBy(today, anchor, weeks), [today, anchor, weeks]);
}
/* the US public holidays of a year, as "YYYY-MM-DD" */
function holidaysOf(y: number): { day: string; name: string }[] {
const nth = (m: number, weekday: number, n: number) => {
const first = new Date(Date.UTC(y, m, 1)).getUTCDay();
return Date.UTC(y, m, 1 + ((weekday - first + 7) % 7) + (n - 1) * 7);
};
const last = (m: number, weekday: number) => {
const end = Date.UTC(y, m + 1, 0);
return end - ((new Date(end).getUTCDay() - weekday + 7) % 7) * DAY_MS;
};
return [
{ day: Date.UTC(y, 0, 1), name: "New Year's Day" },
{ day: nth(0, 1, 3), name: "Martin Luther King Jr. Day" },
{ day: nth(1, 1, 3), name: "Presidents' Day" },
{ day: last(4, 1), name: "Memorial Day" },
{ day: Date.UTC(y, 5, 19), name: "Juneteenth" },
{ day: Date.UTC(y, 6, 4), name: "Independence Day" },
{ day: nth(8, 1, 1), name: "Labor Day" },
{ day: nth(9, 1, 2), name: "Columbus Day" },
{ day: Date.UTC(y, 10, 11), name: "Veterans Day" },
{ day: nth(10, 4, 4), name: "Thanksgiving Day" },
{ day: Date.UTC(y, 11, 25), name: "Christmas Day" },
].map((h) => ({ day: dayKey(h.day), name: h.name }));
}
/** the US public holidays from one day to another, both kept */
export function usHolidays(from: string, to: string): { day: string; name: string }[] {
const out: { day: string; name: string }[] = [];
for (let y = +from.slice(0, 4); y <= +to.slice(0, 4); y++) out.push(...holidaysOf(y).filter((h) => h.day >= from && h.day <= to));
return out;
}
/** the report periods round a day: this quarter, last quarter, this year, the last 30 days */
export function periodsAround(today: string) {
const y = +today.slice(0, 4);
const q = Math.floor((+today.slice(5, 7) - 1) / 3);
const quarter = (y: number, q: number) => ({ start: `${y}-${pad(q * 3 + 1)}-01`, end: dayKey(Date.UTC(y, q * 3 + 3, 0)) });
const last = q === 0 ? quarter(y - 1, 3) : quarter(y, q - 1);
return [
{ label: "This quarter", ...quarter(y, q) },
{ label: "Last quarter", ...last },
{ label: "This year", start: `${y}-01-01`, end: `${y}-12-31` },
{ label: "Last 30 days", start: dayKey(dayMs(today) - 29 * DAY_MS), end: today },
];
}
/** a month's close dates: each "YYYY-MM-DD" keeps its day of the month in `month` ("YYYY-MM"), the last day at most */
export function inMonth(month: string, iso: string): string {
const last = new Date(Date.UTC(+month.slice(0, 4), +month.slice(5, 7), 0)).getUTCDate();
return `${month}-${pad(Math.min(+iso.slice(8, 10), last))}`;
}"use client";
import * as React from "react";
/*
* A demo that plays itself until the first touch: the script lives in the demo, never in the piece, which only gets
* the props a person would give it. It moves 0.4 s after the piece is first seen, then takes each step on its beat;
* off screen or paused it waits. The first press, key or focus on the piece (bind `handOver` to it; a scroll over it never counts) makes it the
* visitor's for good and drops every queued step; with less motion (`off`) it never plays and rests in its first frame.
* A host can hand it over from outside the piece too (a settings panel beside it the visitor has used): under
* <HandedOver value>, it never plays, a remount included.
*
* const play = useSelfPlay(root, { beats: [2800, 2800], loop: true, off: less });
* <div ref={root} onPointerDownCapture={play.handOver} onKeyDownCapture={play.handOver} onFocusCapture={play.handOver}>
* play.step // the step it is at, -1 before its first
* play.control // "pause" while it plays, "play" once paused (a new take), "replay" once it is over or yours
*
* Each step presses the piece's own controls (pressIn), so the script shows exactly what a hand can do.
*
* A host that shows the piece once (<PlayOnce value={{ settle }}>) changes three things: the script starts when the
* piece is first half in view and never again on coming back, it never loops, and with less motion (or `settle`) it
* takes every step at once, so the piece rests on the END of its moment. `hold` is a reason not to play at all that is
* not motion (a mode with nothing to show): it holds in every host. Under <PlayOnce value={{ active: false }}> (a look
* that is mounted but not shown) it waits until it is shown.
*/
type SelfPlayOptions = {
/** how long each step waits after the one before it, in ms; the first step waits 0.4 s after the piece is seen */
beats: readonly number[];
/** starts over after the last step; without it the script plays once and rests */
loop?: boolean | undefined;
/** no self-play at all (less motion): the piece is the visitor's from the start */
off: boolean;
/** no self-play for a reason other than motion (a mode with nothing to show), in every host */
hold?: boolean | undefined;
};
/** How a host shows the piece: once on arrival (see useSelfPlay). */
type PlayOnceHost = {
/** rest on the end at once, without playing (less motion, or a reset) */
settle?: boolean | undefined;
/** false while the piece is mounted but not shown: it waits */
active?: boolean | undefined;
};
const START = 400;
/**
* Whether a demo plays itself at all. Off: every piece rests in its first frame and is
* the visitor's from the start; nothing presses its controls for them.
*/
const SELF_PLAY: boolean = false;
/** True where the visitor has already taken the piece from outside it: nothing under it plays itself. */
const HandedOver = React.createContext(false);
/** A host that shows the piece once: play once on arrival, rest on the end (null: play as the demo asks). */
const PlayOnce = React.createContext<PlayOnceHost | null>(null);
function useSelfPlay(root: React.RefObject<Element | null>, { beats, loop: looped = false, off: still, hold = false }: SelfPlayOptions) {
const once = React.useContext(PlayOnce);
const active = once?.active !== false;
/* shown once: less motion (or a settled host) takes every step at once and rests on the end */
const quick = once != null && (still || Boolean(once.settle));
const loop = once == null && looped;
/* the first touch hands it over for good */
const [mine, setMine] = React.useState(false);
const handOver = React.useCallback(() => setMine(true), []);
const handedOver = React.useContext(HandedOver);
const off = !SELF_PLAY || hold || (quick ? false : still) || mine || (handedOver && !quick);
const [seen, setSeen] = React.useState(false);
const [paused, setPaused] = React.useState(false);
const [taken, setTaken] = React.useState(0);
const n = Math.max(1, beats.length);
const done = !loop && taken >= n;
React.useEffect(() => {
const el = root.current;
if (!active) return;
/* without an observer (an old browser, a test) it counts as seen */
if (!el || typeof IntersectionObserver === "undefined" || quick) {
const t = window.setTimeout(() => setSeen(true));
return () => window.clearTimeout(t);
}
/* shown once: first half in view starts it, and leaving never stops or restarts it */
const io = once
? new IntersectionObserver((es) => {
if (es.some((e) => e.isIntersecting && e.intersectionRatio >= 0.5)) {
setSeen(true);
io.disconnect();
}
}, { threshold: 0.5 })
: new IntersectionObserver((es) => setSeen(es.some((e) => e.isIntersecting)));
io.observe(el);
return () => io.disconnect();
}, [root, active, once, quick]);
const playing = !off && seen && active && !paused && !done;
const delay = quick ? 0 : taken === 0 ? START : (beats[taken % n] ?? START);
React.useEffect(() => {
if (!playing) return;
const t = window.setTimeout(() => setTaken((k) => k + 1), delay);
return () => window.clearTimeout(t);
}, [playing, taken, delay]);
/* one control in one place: Pause while it plays, Play (a new take) once paused, Replay once it is over or yours */
/* self-play off: never "over", so a demo rests in its FIRST frame, not its end frame */
const control: "pause" | "play" | "replay" = paused || !SELF_PLAY ? "play" : off || done ? "replay" : "pause";
return { step: taken === 0 ? -1 : (taken - 1) % n, taken, playing, control, mine, handOver, pause: () => setPaused(true) };
}
/**
* Presses a real control inside `root`, as the visitor would: the first match of `selector`, or the one whose text is
* `text`. A click only, so it never counts as the visitor's touch.
*/
function pressIn(root: Element | null, selector: string, text?: string) {
const all = [...(root?.querySelectorAll<HTMLElement>(selector) ?? [])];
(text == null ? all[0] : all.find((el) => el.textContent?.trim() === text))?.click();
}
export { HandedOver, PlayOnce, pressIn, useSelfPlay, type PlayOnceHost, type SelfPlayOptions };components/ui/notchset/activity-heatmap.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.
LevelAtom: uses no other piece.
Made ofRolling number
Needs your registry key. Every components.json style gets the same files.
Works with React 18.3 or 19 on Tailwind CSS v4, in any shadcn project. What's tested
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
weeks–
(number | null)[][]oldest week first, five working days each (Monday to Friday) or seven (Monday to Sunday); null for a day not drawn
labels–
string[][]each day's name, in the same shape as weeks ("Wed 14 Oct")
label–
stringwhat and when, the grid's accessible name ("Task updates, the last year")
keyLabel–
stringa caption on the line over the grid ("Moves per working day since 3 Aug"); `period` takes its place when given
months–
HeatmapMonth[]the month columns, oldest first, their weeks adding up to the columns of `weeks`
size"md"
"sm" | "md" | "lg" | "fit"the cell size: sm 10px, md 12px (the default), lg 14px, or fit: as wide as the width allows, 8 to 28px; the gap is 3px at every size
unit(n) => `${n} ${n === 1 ? "move" : "moves"}`
(n: number) => stringhow a count reads ("4 moves"); it also writes the total, so format the figure the way it should read
period–
stringthe words after the total on the line over the grid ("in the last year"); without it there is no total
actions–
React.ReactNodecontrols at the end of the line over the grid, such as a range switch
readoutfalse
booleanthe line over the grid reads the lit day (it follows the pointer and the arrow keys) and a pressed day's week, the busiest weekday at its end; without a line the foot names the lit day
keyCountsfalse
booleanthe key's ends are counts ("0" … "12+") instead of Less and More
words–
Partial<typeof HEATMAP_LABELS>its words, English by default
look"steps"
"steps" | "wash""steps" (the default): the data ramp's solid steps with their shine; "wash": one colour's soft wash (15, 27, 42 and 60% over the card, never a solid tile), more air (5px gaps, rounder cells), the lit day lighting its week only, and on first view the cells rise from dots in a diagonal tide, once
Three useshow often something happened each working day over months · when a person or a team does their work · a habit kept day by day
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)One payment, lifetime.
v2.0.0 · 2026-10-13
Released with the Notchset system.