Gradient Wave

An animated WebGL gradient of three colors folding into soft waves, with film grain, after gradflow's stripe gradient. Use it as a background: content goes inside, on top. Pauses offscreen; under reduced motion it draws one still frame.

Installation

npx nuecrea-ui add gradient-wave

Usage

import { GradientWave } from '@/components/ui/gradient-wave';

export default function GradientWaveStory() {
  return (
    <GradientWave
      className="flex h-[480px] items-center justify-center rounded-2xl"
    >
      <h1 className="text-4xl font-semibold tracking-tight text-white">Gradient Wave</h1>
    </GradientWave>
  );
}

API reference

GradientWave

The container. Give it a size; the gradient fills it on a decorative canvas behind the content. Renders <div>.

PropTypeDefaultDescription
colors[string, string, string]"['#1dc9ac', '#075044', '#26312f']"Three hex colors.
speednumber1.15Animation speed; 0 holds still.
scalenumber1.1Zoom of the pattern; higher packs in more waves.
grainnumber0.5Film grain, from 0 to 1.