01

Smoke

Three layers of fractal noise fold into each other to make slow, glowing smoke. An ember palette is hue-rotated into electric blue. The cursor drops a ripple that rides a spring, so it glides after fast moves and settles instead of snapping.

fbm warpripplespring cursor
Live

Installation

Add it to your project

$
pnpm dlx shadcn@latest add https://funshader.com/r/smoke.json

Installs 5 files into components/shaders. The engine is shared, so a second shader only adds its own three files.

Usage

Mount it behind your content

app/hero.tsx
import { SmokeShader } from "@/components/shaders/smoke/smoke-shader";

export function Hero() {
  return (
    <section className="relative isolate min-h-svh overflow-hidden">
      <SmokeShader className="-z-10" />
      {/* your content */}
    </section>
  );
}

The shader fills its nearest positioned ancestor. Give the parent relative isolate and the shader -z-10 to put it behind everything else. The cursor is tracked on the window, so content on top doesn’t block it.

API reference

Props

PropTypeDefaultDescription
colorsShaderColor[]["#160B0B", "#C2402A", "#F49D37", "#FFE8C2"]Palette, low → high. Hex strings or 0–1 RGB triplets, up to 8.
speednumber0.5Multiplier on elapsed seconds.
scalenumber1.06Zoom. Higher values show more of the field.
intensitynumber0.61Turbulence.
paramAnumber0.71Shader-specific parameter.
warpnumber0.2Amount of organic domain warp.
detailnumber1.89Frequency of the warp noise.
contrastnumber1.22Colour grade: contrast.
brightnessnumber-0.06Colour grade: brightness offset.
saturationnumber1.5Colour grade: saturation.
huenumber2.86Hue rotation in radians.
vignettenumber0.29Edge darkening, 0–1.
blurnumber0.006Soft 5-tap blur radius.
grainnumber0.08Film grain amount.
seednumber4786Noise seed.
rotationnumber0.56Field rotation in radians.
driftnumber0.04Slow positional drift.
oklabbooleantrueBlend palette colours in OKLab.
offset[number, number][0.11,0.19]Pans the field.
cursorPartial<ShaderCursor>{"effect":"ripple","strength":0.8,"radius":0.3,"follow":"spring"}Pointer effect: push, lens, swirl, ripple, glow or none.
pausedbooleanfalseFreezes the current frame.
maxDprnumber2Cap on devicePixelRatio.
respectReducedMotionbooleantrueDraws a still frame for prefers-reduced-motion.
classNamestring—Classes for the absolutely-positioned wrapper.

Keep exploring

More shaders