sigilUI

Heatmap Grid

A color-intensity heatmap grid for visualizing 2D data matrices with axis labels.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { HeatmapGrid } from "@sigil-ui/components";

Usage

<HeatmapGrid
  xLabels={["Mon", "Tue", "Wed", "Thu", "Fri"]}
  yLabels={["9am", "12pm", "3pm", "6pm"]}
  data={matrix}
  cellSize={40}
/>

Props

PropTypeDefaultDescription
dataHeatmapCell[][]—2D array of cell values
xLabelsstring[]—Column labels
yLabelsstring[]—Row labels
minnumberautoMinimum value for color scale
maxnumberautoMaximum value for color scale
colorstringvar(--s-primary)High-intensity cell color
cellSizenumber40Cell size in px

Token integration

CSS VariablePurpose
--s-primaryDefault cell color
--s-primary-contrastCell text color
--s-text-mutedAxis labels
--s-font-monoLabel and value font
--s-radius-smCell corner radius