Skip to Content
Kokonut UI

BG-04Backgrounds

Wind

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

Install with
no extra packages

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-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
numberDefault 1

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

speed
numberDefault 1

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

interactive
booleanDefault true

The cursor parts the streams and stirs a wake; a click sends a gust.

Dependencies

NeedsVersionComes from
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.