Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/heat-map.json
Usage
import { HeatMap } from "@/components/ui/heat-map";<HeatMap
data={[
[1, 4, 7, 2],
[3, 8, 5, 1],
]}
rowLabels={["Mon", "Tue"]}
colLabels={["Q1", "Q2", "Q3", "Q4"]}
showValues
/>API Reference
HeatMap
| Prop | Type | Default |
|---|---|---|
data | number[][] | required |
rowLabels | string[] | undefined |
colLabels | string[] | undefined |
colorScale | string[] | DEFAULT_COLOR_SCALE |
cellWidth | number | 5 |
showValues | boolean | false |