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/streamsUsage
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
| Prop | Type | Default | Description |
|---|---|---|---|
color | string | "#3d6bff" | Fold colour, any CSS colour or var() |
breeze | number | 1 | How hard the wind swings the folds. 0 for still air |
folds | number | 16 | How many folds span the top edge |
spread | number | 0.9 | How far the folds flare out toward the bottom. 0 hangs them straight |
glow | number | 1.1 | Brightness of the light in the middle |
grain | number | 1 | Film grain amount. 0 for a clean finish |
speed | number | 1 | Animation speed multiplier. 0 freezes the folds |
strength | number | 1 | Opacity multiplier |
fps | number | 60 | Frame 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
<Streams
color="#8b5cf6"
folds={24}
spread={0}
breeze={1.6}
glow={1.4}
className="absolute inset-0 h-full w-full"
/>