Thousands of particles drift along an evolving Perlin noise field and leave glowing additive trails. The pointer swirls, repels or attracts them and a click sends a short burst.
Included in Standard and aboveCompare plans
Live preview. Move the mouse, scroll and click inside the frame.
import { CanvasFlowField } from "@/components/hyperblur-pro/canvas-flow-field"
<CanvasFlowField className="h-[560px]" pointerMode="swirl"><h1>Ship faster</h1></CanvasFlowField>| Prop | Type | Default | Description |
|---|---|---|---|
| colors | string[] | ["#7c5cff", "#22d3ee", "#f472b6", "#a3e635"] | Trail colors. Particles are split evenly between them and blended additively. |
| background | string | "#06060a" | Background and trail fade color. |
| speed | number | 1 | Particle speed and field evolution multiplier. |
| density | number | 1 | Particle count multiplier. About 14 particles per 100x100 px at 1, capped at 5000. |
| scale | number | 1 | Size of the noise features. Higher values give wider, smoother currents. |
| trail | number | 0.05 | How fast trails fade each frame, from 0.01 (long) to 1 (none). |
| lineWidth | number | 1.1 | Stroke width of the trails in CSS pixels. |
| interactive | boolean | true | Let the pointer influence the particles. |
| pointerMode | "swirl" | "repel" | "attract" | "swirl" | How particles react near the pointer. |
| pointerRadius | number | 160 | Radius of the pointer influence in CSS pixels. |
| seed | number | 7 | Seed for the noise field and particle placement. |
| maxDpr | number | 2 | Upper limit for the device pixel ratio used by the canvas. |
| className | string | "" | Extra classes for the root. Give it a height or let children size it (min-height is 240px). |
| style | CSSProperties | Inline styles merged onto the root. | |
| children | ReactNode | Content rendered on top of the background. |
Source code is included in Standard and above