MenuClose

Fluid Gradient — React Animated Background

Domain-warped fBm noise flowing through a curated palette — organic liquid color, zero video.

View source
PreviewWEBGPU
Starting live preview

Usage

import { FluidGradient, FLUID_PRESETS } from "@/components/FluidGradient";

export function Hero() {
  return (
    <section style={{ position: "relative", minHeight: "100dvh" }}>
      <FluidGradient {...FLUID_PRESETS.sunset}
        {...{
          interactive: true,
          speed: 0.45,
          warp: 2.6,
          scale: 1.5,
          from: "#355c7d",
          to: "#6c5b7b",
          accent: "#c06c84"
        }}
      />
      <div style={{ position: "relative", zIndex: 1, padding: "8rem 2rem" }}>
        <h1>Fluid by default</h1>
      </div>
    </section>
  );
}
Implementation notes & API

Purpose: organic animated background built from domain-warped fractal noise; every frame is computed on the GPU. Mount: full-bleed layer behind content; the canvas fills its parent. Props: from/to/accent hex palette, speed, warp (distortion strength), scale (blob size, lower = larger). Pointer: the liquid plane parallax-shifts against the cursor; interactive={false} pins it. Guardrails: WebGPU required with fallback prop; reduced-motion aware; avoid more than one instance per viewport.

PropertyTypeNotes / default
interactivebooleanfalse in the library; enabled in this preview
fallbackReactNodeShown when the renderer is unavailable
className / stylestring / CSSPropertiesApplied to the outer container
View source on GitHubFree for commercial projects · MIT