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
Inside, each strip is shown whole at half size: twice as wide as the box, so when it starts over the box never sees a seam. Near strips slide faster than far ones.
Same pace slides every layer at one speed, so the water looks like one flat sheet. Near ones faster gives the near layers a quicker pace, so the water looks deep.
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.
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.
Your settings
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 GitHubWhat it is
The full explanation is in README.md.