jay sharma

Shader Gradient

Heroes 4

About

Quiet WebGL color wash for landing heroes, empty states, and marketing sections: theme-aware, optional pointer follow.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Shader Gradient to your project and fits it to your theme.

Code

How Shader Gradient is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client"

import { ShaderGradient } from "@/components/ui/shader-gradient"

const settings = {
  colors: ["#F7A48B", "#F9D78E", "#9FCBF0", "#BBA9EE"],
  speed: 0.14,
  blur: 0.7,
  intensity: 0.95,
  grain: 0.35,
  interactive: true,
}

// Unchanged colors are left unset so the component picks its own light/dark palette.
function sameColors(a: string[], b: string[]) {
  return a.length === b.length && a.every((c, i) => c.toLowerCase() === b[i]!.toLowerCase())
}

export default function ShaderGradientDemo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props }

  return (
    <div className="flex min-h-[520px] w-full items-center justify-center bg-background p-4">
      <div className="relative aspect-[16/9] min-h-[360px] w-full max-w-5xl overflow-hidden rounded-xl border border-border bg-background">
        <ShaderGradient
          className="absolute inset-0"
          colors={sameColors(s.colors, settings.colors) ? undefined : s.colors}
          speed={s.speed}
          blur={s.blur}
          intensity={s.intensity}
          grain={s.grain}
          interactive={s.interactive}
        />
      </div>
    </div>
  )
}

More by jay sharma

View all
  • Live Orb

    Live Orb

    203
  • Chrome Button

    Chrome Button

    181
  • Frame Button

    Frame Button

    131
  • Highlight Button

    Highlight Button

    75
  • ASCII Fluid

    ASCII Fluid

    72
  • Motion Button

    Motion Button

    59
  • Brutal Button

    Brutal Button

    54
  • Grid Button

    Grid Button

    49

More in Heroes

View all
  • SaaS Template

    SaaS Template

    2.4K
  • Hero

    Hero

    1.2K
  • Responsive Hero Banner

    Responsive Hero Banner

    2K
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    922
  • HeroSectionWithGradient

    HeroSectionWithGradient

    335
  • Editorial Collage Hero

    Editorial Collage Hero

    426
  • Hero 03

    Hero 03

    315
  • Glass Fold

    Glass Fold

    202