Animated Gradient

Animated gradient background with multiple shader effects built using WebGL.

The Animated Gradient component creates mesmerizing, high-performance animated backgrounds using WebGL shaders with domain warping for organic, silk-like flowing streams.

Preview

AnimatedGradient

Presets

lava

Usage

Installation

$ pnpm dlx shadcn add https://infinityui.vercel.app/r/animated-gradient.json

Basic Example

import { AnimatedGradient } from "@/components/animated-gradient";

export default function App() {
  return (
    <AnimatedGradient
      variant="mist"
      speed={1}
      opacity={0.8}
      className="h-screen w-full"
    />
  );
}

Properties

PropTypeDefaultDescription
variant"mist" | "lava"mistVisual effect variant. mist creates a purple/indigo dynamic background, lava creates a rich warm blurry bonfire flow.
speednumber1Animation speed multiplier. Higher values = faster animation.
opacitynumber0.8Canvas opacity (0-1). Use to blend with background layers.
classNamestringAdditional CSS classes for the container.
childrenReactNodeOverlay content to display on top of the gradient background.