Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Preview

lessmore

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/heat-calendar

Import the shared styles once in your application.

TSUsage
import HeatCalendar from '@/components/beui/charts/HeatCalendar.vue'
import '@/components/beui/styles.css'

API Reference

HeatCalendar

unit?
string

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

Default—
weeks?
number

Number of week columns.

Default16
maxCount?
number

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

Default14
values?
readonly (readonly 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.

Defaultvar(--beui-accent, oklch(72% 0.18 195))
class?
string
Default—
v-model:selection?
HeatCalendarSelection | null

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

Defaultundefined
defaultSelection?
HeatCalendarSelection | null
Default—
labels?
Partial<HeatCalendarMessages>

Override any built-in string.

Default—
@selection-change?
(range: HeatCalendarProps['selection']) => void
Default—
#default?
slot

Compose `HeatCalendarGrid` (with `HeatCalendarTooltip` inside) and `HeatCalendarLegend`; omit it for the complete chart.

Default—

HeatCalendarGrid

class?
string
Default—
#default?
slot

Overlay content rendered inside the grid, normally `HeatCalendarTooltip`.

Default—

HeatCalendarLegend

class?
string
Default—

HeatCalendarTooltip

class?
string
Default—
#default?
{ data: HeatCalendarTooltipData }

Custom tooltip content for the hovered cell, or the span being previewed.

Default—

Updated