Heat Grid
Displays a single bounded reading as a matrix of cells that fill as it rises.
Configurations
6 examplesAdd to your project
One command adds this component to your project.
Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.
npx shadcn@latest add @aicanvas/••••••••••••Light and dark both come with the install and follow the dark class on <html>, the shadcn dark mode setup (next-themes with attribute="class").
Props
Every prop this component accepts. Any other prop is forwarded to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | 0 | 0–100 fill level (clamped). |
| cols | number | 7 | Number of columns in the cell matrix. |
| rows | number | 5 | Number of rows in the cell matrix. |
| cellSize | number | 22 | px per cell side. |
| gap | number | 3 | px between cells. |
| showValue | boolean | true | Render the brand percentage readout beside the grid. |
| unit | string | '%' | Suffix appended to the value readout. |
| label | string | - | Accessible name for the meter. |
| className | string | - | Extra class names for the root element. |
| style | React.CSSProperties | - | Inline styles merged onto the root element. |