Background

Wavy

Organic wave animations with simplex noise and customizable gradients. Perfect for React hero sections requiring fluid visual effects with Next.js integration and TypeScript support.

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/wavy-background.json
npx shadcn@latest add https://www.shadcn.io/registry/wavy-background.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/wavy-background.json
bunx shadcn@latest add https://www.shadcn.io/registry/wavy-background.json

Features

  • Simplex noise animation creating smooth, organic wave patterns with natural flow algorithms
  • Customizable color palettes supporting arrays of hex colors for gradient wave effects
  • Canvas-based rendering using efficient HTML5 Canvas with requestAnimationFrame optimization
  • Built-in blur effects with Safari compatibility and configurable intensity levels
  • Responsive adaptation automatically adjusting to container dimensions and window resize
  • Speed control options offering slow or fast animation modes for different visual impacts
  • Opacity configuration supporting subtle background effects or bold visual statements
  • Content overlay system enabling text and elements to be layered over wave animations
  • TypeScript support with complete interface definitions for reliable integration

Examples

Dark Theme Variant

Loading component...

Use Cases

This free open source React component works well for:

  • Hero sections - Flowing wave backgrounds for modern landing pages built with Next.js
  • Portfolio headers - Organic animations showcasing creative capabilities using TypeScript
  • Brand experiences - Fluid visual effects expressing innovation and creativity
  • Loading screens - Mesmerizing wave patterns during content loading using shadcn/ui design
  • Dashboard backgrounds - Subtle animated textures for admin interfaces
  • Creative showcases - Artistic wave effects for galleries and design portfolios using Tailwind CSS

API Reference

Props

PropTypeDefaultDescription
childrenReact.ReactNode-Content to display over the wavy background
classNamestring-CSS classes for the content wrapper
containerClassNamestring-CSS classes for the main container
colorsstring[]["#38bdf8", "#818cf8", "#c084fc", "#e879f9", "#22d3ee"]Array of color strings for the waves
waveWidthnumber50Width/thickness of the wave lines
backgroundFillstring"white"Background color behind the waves
blurnumber10Blur intensity applied to the waves
speed"slow" | "fast""fast"Animation speed of the waves
waveOpacitynumber0.5Opacity of the wave animation (0-1)

Implementation Notes

  • Component uses simplex-noise library for organic, natural wave movement patterns
  • Canvas rendering automatically handles resizing and adapts to container dimensions
  • Blur effects optimized for Safari compatibility with configurable intensity (0-20+ pixels)
  • Color arrays support unlimited hex values creating smooth gradient transitions across waves
  • Speed modes: "slow" for subtle movement, "fast" for dynamic visual effects
  • Wave opacity ranges from 0.2 (subtle background) to 0.8+ (bold visual statements)
  • Wave width configurable from 20px (delicate patterns) to 80px+ (bold strokes)
  • Content overlay system supports complex layouts with proper z-index management
  • Compatible with shadcn/ui design system and Tailwind CSS utility classes
  • Performance optimized using requestAnimationFrame for smooth 60fps animation across devices