CarsXE

Search docs

Search pages, components, and skills.

Heatmap

A GitHub-style calendar heatmap that shows a value per day, with month and weekday labels and a Less-to-More legend. Height derives from width and the number of weeks so cells always stay square — there is no height prop.

Daily revenue calendar

Gross volume per day, so quiet stretches and spikes are visible at a glance.

Daily revenue calendarGross revenue per day for the trailing twelve months.SepOctNovDecJanFebMarAprMayJunJulAugMWF
LessMore· up to $12.1K

Installation

Import from the package. Do not run shadcn add in your app.

tsx
import { Heatmap } from "@carsxe/design-system/components/heatmap"

Usage

tsx
import { Heatmap } from "@carsxe/design-system/components/heatmap"

<Heatmap ariaLabel="Daily revenue" data={[{ date: "2026-08-12", value: 1240 }]} />

Monday start with a count formatter

API lookups for the last 90 daysJunJulAugMWF
LessMore· up to 480 lookups

Custom color scale

Daily revenue with a four-step brand scaleJunJulAugMWF
LessMore· up to $480

API Reference

PropTypeDefault
ariaLabelstring—
data{ date: string | Date; value: number }[]—
descriptionstring—
startDatestring | Datemin data date
endDatestring | Datemax data date
weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 60 (Sunday)
colorsstring[]CarsXE heatmap tokens (5 levels)
emptyColorstringvar(--border)
valueFormatter(value: number) => stringvalue.toLocaleString()
showLegendbooleantrue
onCellSelect(datum: { date: Date; value: number }) => void—
emptyMessagestring"No chart data available."