Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationHeatmap

Heatmap

Install Dependencies

npx
quickcode-ui add Heatmap

Examples

Default Heatmap

GitHub-Style Value Heatmap

Heatmap with Tooltip

Props

Heatmap

PropTypeDefaultDescription
datanumber[][]Heatmap matrix of values.
colorFn(value, row, col, min, max) => stringFull custom coloring logic.
colorScalestring[]Tailwind-based color bucket list.
gapnumber4Gap between heatmap cells (px).
cellSizenumber20Size of each cell (width + height).
rowLabelsstring[]Optional labels for rows.
colLabelsstring[]Optional labels for columns.
minnumberMinimum value for color scaling.
maxnumberMaximum value for color scaling.
captionstringAccessible caption for the heatmap.
onCellClick(row: number, col: number, value: number) => voidCallback fired when a cell is clicked.

Heatmap.Tooltip

PropTypeDefaultDescription
content(value: number, row: number, col: number) => ReactNodeCustom JSX/UI to show inside tooltip.
side"top" | "right" | "bottom" | "left""top"Tooltip position relative to cell.
classNamestringAdditional CSS classes for tooltip.
Last updated on