Product Design
Hero Background Effects
Beginner28 uses

Vanta WAVES — Flowing Ocean Wave Background

Adds a mesmerizing animated ocean wave effect to your hero section using Vanta.js WAVES. Smooth 3D waves ripple across the background, creating a calming yet dynamic feel.

vantabackgroundheroanimationwebglwavesocean

This page is a library overview, not the complete skill package. Open the original source for all files, installation instructions, dependencies and license.

Get full code on GitHub
📋

Library notes (not the full source)

Vanta WAVES — Flowing Ocean Wave Hero Background

What this does

Adds smooth, animated 3D ocean waves to your hero section background. The waves flow continuously and react to mouse movement.

Style Name

WAVES

When to use

  • Clean, modern hero sections
  • Blue/ocean-themed brands
  • When you want an elegant, fluid animation

Implementation

1. Load dependencies in <head>

<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>

2. Apply to your hero element

<section id="hero">Your content here</section>

<script>
VANTA.WAVES({
  el: "#hero",
  mouseControls: true,
  touchControls: true,
  gyroControls: false,
  color: 0x1a1a4e,
  shininess: 80,
  waveHeight: 28,
  waveSpeed: 2.2,
  zoom: 0.85
});
</script>

3. Key config options

| Option | Description | Default | |---|---|---| | color | Wave color (hex int) | 0x1a1a4e | | shininess | Wave surface shininess | 80 | | waveHeight | Height of waves | 28 | | waveSpeed | Speed of wave animation | 2.2 | | zoom | Camera zoom level | 0.85 |

React / JSX usage

useEffect(() => {
  const effect = VANTA.WAVES({
    el: heroRef.current,
    THREE: window.THREE,
    color: 0x1a1a4e,
    shininess: 80,
    waveHeight: 28,
    waveSpeed: 2.2
  });
  return () => effect.destroy();
}, []);

Notes

  • WAVES uses color (not backgroundColor) — the wave color IS the background.
  • Works best with light-colored text overlaid.
  • Pair with a semi-transparent overlay for text readability.