Skip to content
Get Kosh Pro
← All components
Motion

ComponentsStreak Heatmap

Streak Heatmap

A logged day pops and joins the pattern.

  • CSS layer
  • Implemented
  • Kosh Pro · $15 once

9day streak

View as table
Logged days, newest first
DateValue
2026-11-0440
2026-11-0340
2026-11-0260
2026-11-0125
2026-10-3125
2026-10-3025
2026-10-2960
2026-10-2825
2026-10-2760
2026-10-2510
2026-10-2425
2026-10-2360
2026-10-2225
2026-10-2160
2026-10-2025
2026-10-1925
2026-10-1825
2026-10-1725
2026-10-1625
2026-10-1540
2026-10-1240
2026-10-1110
2026-10-0960
2026-10-0840
2026-10-0740
2026-10-0610
2026-10-0540
2026-10-0325
2026-10-0225
2026-10-0125
2026-09-3025
2026-09-2925
2026-09-2825
2026-09-2640
2026-09-2540
2026-09-2440
2026-09-2340
2026-09-2160
2026-09-2010
2026-09-1960
2026-09-1840
2026-09-1660
2026-09-1525
2026-09-1340
2026-09-1140
2026-09-1040
2026-09-0840
2026-09-0760
2026-09-0640
2026-09-0510
2026-09-0425
2026-09-0340
2026-09-0225
2026-09-0125
2026-08-3110
2026-08-3025
2026-08-2840
2026-08-2760
2026-08-2625
2026-08-2560
2026-08-2410
2026-08-2325
2026-08-2210
2026-08-2160
2026-08-2025
2026-08-1940
2026-08-1840
2026-08-1710
2026-08-1660
2026-08-1510
2026-08-1440
2026-08-1125
2026-08-0925
2026-08-0840
2026-08-0725
2026-08-0640
2026-08-0525
2026-08-0440
2026-08-0210
2026-08-0140
2026-07-3140
2026-07-3040
2026-07-2940
2026-07-2825
2026-07-2740
2026-07-2525
2026-07-2425
2026-07-2360
2026-07-2260
2026-07-2140
2026-07-2010
2026-07-1960
2026-07-1810
2026-07-1640
2026-07-1540
2026-07-1440
2026-07-1325
2026-07-1140
2026-07-0940
2026-07-0825
2026-07-0740
2026-07-0640
2026-07-0510
2026-07-0425
2026-07-0340
2026-06-3060
2026-06-2910
2026-06-2825
2026-06-2640
2026-06-2425
2026-06-2325
2026-06-2140
2026-06-2010
2026-06-1810
2026-06-1725
2026-06-1560
2026-06-1460
2026-06-1340
2026-06-1260
2026-06-1110
2026-06-1025
2026-06-0940
2026-06-0725
2026-06-0625
2026-06-0460
2026-06-0225
2026-06-0160
2026-05-3025
2026-05-2940
2026-05-2740
2026-05-2640
2026-05-2525
2026-05-2425
2026-05-2325
2026-05-2260
2026-05-2025
2026-05-1840
2026-05-1640
2026-05-1560
2026-05-1425
2026-05-1240
2026-05-1160
motion prop

onSettle has fired 0 times. The prop can only calm this component further. The switch at the top of the page and your system setting still apply.

Why it moves this way

A contribution graph is a record. This is a record that reacts. The pop is small on purpose (28%): big enough to register at the edge of your vision, small enough to repeat every day for a year without getting tiresome.

Use it

PowerShell / install with a Kosh Pro key
npx shadcn@latest add @kosh-pro/streak-heatmap
React / TypeScript
import { StreakHeatmap } from "@/kosh/streak-heatmap/streak-heatmap";

const [days, setDays] = useState<StreakDay[]>(initialDays);

<StreakHeatmap data={days} weeks={26} showCount />

// Log today: a new array with one more day
setDays([...days, { date: "2026-11-05", value: 40 }]);

Streak Heatmap is part of Kosh Pro. Your license key unlocks the @kosh-pro registry, which installs it with the motion core it needs. Set up the Pro registry ↗ Get Kosh Pro ↗

At each motion level

full
The logged cell pops (1 → 1.28 → 0.94 → 1, 320 ms) and sends out a ring (600 ms). Its signal colour cools to the data colour on the next update. When a new week starts, the grid slides one column.
reduced
The cell does not scale and the ring does not grow. The ring fades in place and the signal colour still cools.
none
The cell simply has its new colour.

Props

Streak Heatmap props
PropTypeDefaultWhat it does
data{ date: string; value: number }[]requiredOne entry per day, ISO dates. A value of 0, or a missing day, means not logged.
weeksnumber26Columns to show.
thresholds[number, number, number]quarters of the largest valueUpper bounds for intensity levels 1 to 3. Above the last is level 4.
weekStartsOn0 | 110 for Sunday, 1 for Monday.
endDatestringlatest date in dataThe last day of the grid. The component never reads the clock, so server and browser always agree.
showCountbooleanfalseShows the current streak above the grid with a Flow Number.
countLabelstring"day streak"Text after the count.
labelstringbuilt from the dataThe accessible description of the grid.
showTablebooleanfalseAdds a “View as table” disclosure listing every logged day shown.
enterbooleanfalseIf the grid is off screen at load, its columns fade in as it scrolls into view.
Shared by every Kosh component
PropTypeDefaultWhat it does
motion"auto" | "full" | "reduced" | "none""auto"Motion for this component only. The calmest of this prop, the provider and the operating system wins.
tone"ink" | "signal" | "muted""ink"Which colour carries the data.
onSettle() => voidnoneCalled once the component has come to rest after an update.
classNamestringnoneAdded to the root element.

Theme with CSS variables on any ancestor: --k-heatmap-cell, --k-heatmap-gap, --k-heatmap-radius, --k-level-1 … --k-level-4.

Accessibility

  • The grid is one image to a screen reader, not 182 cells. Its label gives the streak and the range, and showTable adds the same days as a real table.
  • Empty days are an outline, not a faint fill, so colour strength is not the only sign of “nothing”.
  • If you log days on a timer, give people a pause control.

Limits and differences

  • More than seven new days in one update is treated as a new dataset and does not animate. This is deliberate: 180 cells popping at once is not an update.
  • A fresh cell cools when the next update arrives, not on a timer.