Wind - React Component | Kokonut UI

Wind

Streamlines that part around the cursor, swirl in its wake and scatter on click, built with React and Canvas.

Install with

Agentbunnpmpnpm

Open in

Copy code

›Add the flow-field component from Kokonut UI to this project with npx shadcn@latest add https://kokonutui.com/r/flow-field.json, then show me how to use it.

no extra packages

Ship with the wind

The air parts around your cursor and swirls in its wake. Click anywhere for a gust.

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-field

Usage

import FlowField from "@/components/kokonutui/flow-field";

export default function Example() {
  return <FlowField />;
}

Props

className

string

Extra classes for the root element.

children

ReactNode

Content drawn over the wind, such as a hero's heading.

density

number Default 1

Multiplies the number of particles (about 700 at 1).

speed

number Default 1

How fast the wind blows. 0 holds a still frame.

interactive

boolean Default true

The 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.

[Shape Hero
A landing hero where shapes drop in, pile up under the headline and can be grabbed and thrown.](/content/docs/backgrounds/shape-hero/index.html) [Topo Background
A living contour map that drifts, rises under the cursor and ripples on click, built with React and Canvas.](/content/docs/backgrounds/topo-background/index.html)