07.18 · Ambient & Background

Wave Layers

Layers of waves drift sideways, each at its own speed. Best for hero sections.

Watch it

It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.

Wave layers

Near waves move faster than far ones

Try it

Change a setting and see the difference as it moves.

Speed

Slow feels like a calm sea.

Colors

Far layers are the palest, near ones the darkest.

Wave height

High waves look like rough water.

More optionsFewer options

Number of layers

More layers give more depth; the far ones go first.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add layered waves to [the bottom of the section you want them in]. Stack a few strips of water, each one twice as wide as the section with the same wave shape repeated along its top edge: far strips sit higher, paler and with smaller waves, near strips lower, darker and with bigger ones. Slide every strip sideways by half its width, over and over, so the repeated shape hides the restart, and give near strips a quicker pace than far ones so the water feels deep. Move the strips only by shifting them, which keeps it smooth on phones. If the visitor has reduced motion turned on, keep the waves still. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Hero sections
  • Page footers
  • Section dividers
  • Travel and beach sites

Avoid on

  • Dense dashboards
  • Long reading pages