Library navigation

Heatmap Background

Flowing thermal colors move from cool blue through green and yellow to hot red.

Flowing thermal colors move from cool blue through green and yellow to hot red. Hover to add heat around the pointer. The temperatures are decorative and do not represent measured data.

Heatmap Background is a vgpu-powered React UI component that renders a WGSL shader through WebGPU. It supports reduced motion and provides a fallback for browsers without WebGPU.

Installation

text
Add the heatmap-background component from Hangry UI to this project.
Use the project's package manager to run:
shadcn@latest add https://ui.razeev.com/r/heatmap-background.json
Integrate the component with the existing layout and styling.
Keep its interactions and reduced-motion support intact.

How to use

tsx
import { HeatmapBackground } from "@/components/hangry-ui/shader/heatmap-background";
<HeatmapBackground scale={1.5} speed={0.2} intensity={0.9}
className="grid place-items-center p-12">
<h2 className="typography-section-title text-white">Turn up the heat.</h2>
</HeatmapBackground>

Props

PropTypeDefaultDescription
scalenumber1.5Field frequency, clamped to 0.25–6.
speednumber0.2Nonnegative ambient animation speed. Set 0 to freeze the ambient field.
intensitynumber0.9Background brightness, clamped to 0–2.
interactivebooleantrueEnable the pointer effect.
childrenReactNode—Content displayed above the shader.
Native div propsComponentProps—Classes, styles, IDs, and accessibility attributes.

Dependencies

  • Motion
  • vgpu