Heatmap Grid
A color-intensity heatmap grid for visualizing 2D data matrices with axis labels.
Preview
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
| Prop | Type | Default | Description |
|---|---|---|---|
data | HeatmapCell[][] | — | 2D array of cell values |
xLabels | string[] | — | Column labels |
yLabels | string[] | — | Row labels |
min | number | auto | Minimum value for color scale |
max | number | auto | Maximum value for color scale |
color | string | var(--s-primary) | High-intensity cell color |
cellSize | number | 40 | Cell size in px |
Token integration
| CSS Variable | Purpose |
|---|---|
--s-primary | Default cell color |
--s-primary-contrast | Cell text color |
--s-text-muted | Axis labels |
--s-font-mono | Label and value font |
--s-radius-sm | Cell corner radius |