React Heatmap / Matrix
A grid where colour carries magnitude — the right tool for correlation matrices, wafer-lot yield grids, and calendar heatmaps, and the one generic chart libraries render worst. Every cell also prints its value, because colour is never the only channel.
Wafer yield by lot × process step (%)
| Litho | Etch | Implant | CMP | Metal | Test | |
|---|---|---|---|---|---|---|
| Lot A1 | 98.4 | 97.1 | 96.8 | 95.2 | 94.0 | 92.6 |
| Lot A2 | 98.1 | 96.4 | 95.9 | 94.8 | 93.1 | 91.2 |
| Lot B1 | 97.6 | 95.2 | 94.1 | 92.0 | 90.4 | 88.1 |
| Lot B2 | 96.9 | 94.0 | 93.2 | 91.1 | · | 85.9 |
| Lot C1 | 98.7 | 97.8 | 97.2 | 96.4 | 95.1 | 94.3 |
| Lot C2 | 97.2 | 95.6 | 94.8 | 93.0 | 91.5 | 89.4 |
Installation
Props
| Prop | Type | Description |
|---|---|---|
| rows | string[] | Row labels, top to bottom |
| cols | string[] | Column labels |
| cells | HeatmapCell[] | { row, col, value, display? }; value: null = gap |
| scale | "sequential" \ | "diverging" |
| min max | number | Domain bounds; inferred when omitted |
| midpoint | number | Centre of the diverging scale (default 0) |
| unit | string | Appended to the readout |
| hideValues | — | Colour + tooltip only |
Colour that survives colour blindness
Both scales interpolate through CVD-safe stops — a viridis-like ramp for sequential data, a blue↔amber divergence for signed data. Neither relies on a red/green distinction, which roughly 8% of men cannot make, and the printed value is always present as a fallback. A cell's text colour is chosen from the luminance of its fill, so numbers stay legible at both ends of the ramp.
Use sequential for quantities with a natural zero (yield, count, duration) and diverging for values that straddle a meaningful midpoint (correlation from −1 to +1, deviation from target). Pick the wrong one and you either waste half the colour range or imply a midpoint that isn't there.
A null value renders as a dashed empty cell — "not measured", which is genuinely different from a measured zero and should never share its colour.
New components every week
Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.