TidalUI

Heatmap preview

Inspect exact values across two categorical axes with keyboard navigation and a neutral intensity scale.

pro · Data · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/heatmap

Import components/ui/tidal.css, components/ui/heatmap.css. Wrap installed components in tidal-scope.

Preview

Heatmap component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/heatmap.css";
import{TidalHeatmap}from"./components/ui/heatmap";
export default(p:Parameters<typeof TidalHeatmap>[0])=><div className="tidal-scope"><TidalHeatmap {...p}/></div>;

API and props

TidalHeatmap.cells (required)
ReadonlyArray<TidalHeatmapCell>

Required cells value accepted by this exported component.

TidalHeatmap.columns (required)
ReadonlyArray<TidalHeatmapAxis>

Required columns value accepted by this exported component.

TidalHeatmap.onSelectedCellChange (required)
(cell: TidalHeatmapCell, event: MouseEvent<HTMLButtonElement>) => void

Callback invoked when the selected cell change interaction is proposed.

TidalHeatmap.rows (required)
ReadonlyArray<TidalHeatmapAxis>

Required rows value accepted by this exported component.

TidalHeatmap.selectedCell (required)
TidalHeatmapCoordinate | null

Required selected cell value accepted by this exported component.

TidalHeatmap.title (required)
ReactNode

Required title value accepted by this exported component.

TidalHeatmap.cellProps
((cell: TidalHeatmapCell) => CellProps) | undefined

Optional cell props value accepted by this exported component.

TidalHeatmap.cellRef
((cell: TidalHeatmapCell) => Ref<HTMLButtonElement>) | undefined

Optional cell ref value accepted by this exported component.

TidalHeatmap.description
ReactNode

Optional description value accepted by this exported component.

TidalHeatmap.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalHeatmap.formatValue
((value: number) => string) | undefined

Optional format value value accepted by this exported component.

TidalHeatmap.headingLevel
"h2" | "h3" | "h4" | "h5" | undefined

Optional heading level value accepted by this exported component.

TidalHeatmap.labels
Partial<{ grid: string; noData: string; noneSelected: string; selection: string; range: string; minimum: string; maximum: string; invalid: string; empty: string; }> | undefined

Optional labels value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas