BG-04Backgrounds
Wind
Streamlines that part around the cursor, swirl in its wake and scatter on click, built with React and Canvas.
PRODither Reveal Hero and more like it are in Kokonut UI Pro
Installation
Wind is a free, open-source React component in the Kokonut UI Backgrounds collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/flow-field.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/flow-fieldUsage
import FlowField from "@/components/kokonutui/flow-field";
export default function Example() {
return <FlowField />;
}Props
classNamestringExtra classes for the root element.
childrenReactNodeContent drawn over the wind, such as a hero's heading.
densitynumberDefault 1Multiplies the number of particles (about 700 at 1).
speednumberDefault 1How fast the wind blows. 0 holds a still frame.
interactivebooleanDefault trueThe cursor parts the streams and stirs a wake; a click sends a gust.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.