deleted

Waves Background

Backgrounds 362

About

An interactive wave animation background with cursor-based physics interactions creates a dynamic grid of connected points that respond to mouse or touch movement and generate wave-like patterns using Perlin noise. Features: • Smooth physics-based animations • Mouse and touch interaction with momentum • Perlin noise-based wave generation • Theme-aware styling • Responsive design • Customizable wave parameters • Performance optimized • Interactive cursor feedback

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

Code

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

Usage.tsx

import { useTheme } from "next-themes"
import { Waves } from "@/components/ui/waves-background"

function WavesDemo() {
  const { theme } = useTheme()
  
  return (
    <div className="relative w-full h-[400px] bg-background/80 rounded-lg overflow-hidden">
      <div className="absolute inset-0">
        <Waves
          lineColor={theme === "dark" ? "rgba(255, 255, 255, 0.3)" : "rgba(0, 0, 0, 0.3)"}
          backgroundColor="transparent"
          waveSpeedX={0.02}
          waveSpeedY={0.01}
          waveAmpX={40}
          waveAmpY={20}
          friction={0.9}
          tension={0.01}
          maxCursorMove={120}
          xGap={12}
          yGap={36}
        />
      </div>

      <div className="relative z-10 p-8">
        <h3 className="text-2xl font-bold">Interactive Waves</h3>
        <p className="text-muted-foreground">Move your mouse to interact with the waves</p>
      </div>
    </div>
  )
}

export { WavesDemo } 

More by deleted

View all
  • Splash Cursor

    Splash Cursor

    1.3K
  • Star Border

    Star Border

    728
  • Tilted Scroll

    Tilted Scroll

    433
  • Squares Background

    Squares Background

    326
  • Prism

    Prism

    218
  • Grid Motion

    Grid Motion

    183
  • Circular Gallery

    Circular Gallery

    173
  • Bounce Cards

    Bounce Cards

    143

More in Backgrounds

View all
  • Elegant Dark Pattern

    Elegant Dark Pattern

    811
  • Gradient Backgrounds

    Gradient Backgrounds

    25
  • Jade Sky

    Jade Sky

    85
  • Light theme Tailwind CSS Background Snippet

    Light theme Tailwind CSS Background Snippet

    221
  • Background snippets

    Background snippets

    16
  • Gradient Blur Bg

    Gradient Blur Bg

    34
  • Background Components

    Background Components

    233
  • LivingOrigami bg

    LivingOrigami bg

    134