Streams

A WebGL2 shader of coloured, fluted folds fanning down from the top edge, swaying in a light breeze, with film grain.

Props
Color
#3d6bff
Folds16
Breeze1.00
Spread0.90
Glow1.10
Grain1.0
Speed1.00
Strength1.00

Installation

pnpm dlx shadcn@latest add @breeze/streams

Usage

import { Streams } from "@/components/breeze/streams"

It hangs behind a hero. The canvas is transparent, so your background shows through between the folds.

<section className="relative isolate overflow-hidden">
  <Streams className="absolute inset-0 -z-10 h-full w-full" />
  {/* content */}
</section>

Props

PropTypeDefaultDescription
colorstring"#3d6bff"Fold colour, any CSS colour or var()
breezenumber1How hard the wind swings the folds. 0 for still air
foldsnumber16How many folds span the top edge
spreadnumber0.9How far the folds flare out toward the bottom. 0 hangs them straight
glownumber1.1Brightness of the light in the middle
grainnumber1Film grain amount. 0 for a clean finish
speednumber1Animation speed multiplier. 0 freezes the folds
strengthnumber1Opacity multiplier
fpsnumber60Frame rate cap

Every prop updates live without restarting the animation. It only ever uses color itself; the folds and light change how much of it shows. Gusts roll across from one side, swinging the folds more the further they hang. In dark mode the folds glow; in light mode they're a coloured relief, deeper in the creases. The animation pauses off-screen and shows a still frame with reduced motion.

Examples

Straight pleats, violet