Heatmap Cell

A square heatmap cell whose fill blends from a muted base to the accent color by an intensity from 0 to 1, with an aria label. Tile it for activity grids.

src/registry/ui/heatmap-cell.tsx/r/heatmap-cell.json

Installation#

bash
npx shadcn@latest add @minidev/heatmap-cell

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/heatmap-cell.json

Usage#

tsx
import { HeatmapCell } from "@/components/ui/heatmap-cell"

export function Example() {
  return (
    <HeatmapCell key={idx} intensity={i} label={`${Math.round(i*100)}%`} />
  )
}

API reference#

HeatmapCell props
PropTypeDefault
intensitynumber0
labelstring-
classNamestring-

Examples#

All chart components