Component libraryHeatmap
Heatmap
ProInspect exact values across two categorical axes with keyboard navigation and a neutral intensity scale.
npx shadcn@latest add @tidal-pro/heatmapInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/heatmap.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Consumer-owned rows and columns require unique nonblank string IDs and labels. Cells identify one exact row/column pair and contain a finite number or null; omitted pairs also mean no data. Duplicate cells, unknown axes, invalid selection or values, axes beyond100 entries, or matrices beyond2500 cells produce a visible error. Controlled selectedCell/onSelectedCellChange proposes the exact cell through native activation. Independent roving keyboard focus supports Arrow keys, Home/End and Ctrl+Home/End; logical horizontal arrows honor RTL and reveal only the local matrix scroller. Exact cell values remain visible and accessible beyond color, missing data stays distinct from zero, and the default formatter preserves represented number precision. The intensity calculation scales before subtracting to handle extreme finite domains. Root/cell native props and cleanup-aware refs are supported with owned markup, disabled state, tab order and labels protected. Optional formatting, labels, h2-h5 hierarchy and global disabled state are supported. No aggregation, request, analytics, storage or external effect is performed. Stable per-cell ref identities avoid remounts on ordinary focus/selection updates. A removed focused grid falls back to the labelled root only while focus remains on body. Composition events, including keyCode229 fallback, do not move cells.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.