Heat Calendar

Preview

 lessmore

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/heat-calendar

API Reference

HeatCalendar

unit?
string

Noun after every count, e.g. "commits", "ships".

Default—
weeks?
number

Number of week columns.

Default—
maxCount?
number

Count a cell at intensity 1 stands for; a cell reads `intensity × maxCount`.

Default—
values?
number[][]

`values[week][day]` intensities in 0..1, seven days per week. Missing values are zero.

Default—
endDate?
Date

Last UTC calendar day of the grid. Defaults to today after mount; explicit dates render identically in every timezone.

Default—
color?
string

The single hue. Any CSS color; magnitude maps to its strength, never to a second color.

Default—
className?
string
Default—
selection?
HeatCalendarSelection | null

Controlled selection; null clears it. Cell coordinates are zero-based week/day (Monday first).

Default—
defaultSelection?
HeatCalendarSelection | null
Default—
onSelectionChange?
((selection: HeatCalendarSelection | null) => void)
Default—

HeatCalendarGrid

className?
string
Default—

HeatCalendarLegend

className?
string
Default—

HeatCalendarTooltip

className?
string
Default—

Contributed by

Savva

Updated