Build an Animated SVG Wave and Liquid Fill Background Generator

A single HTML file that generates layered, seamlessly looping SVG waves with live controls and exports ready-to-use animated SVG and CSS code.

You getone complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior front-end developer and motion designer. Build "Tidewright", a single-page SVG wave and liquid fill background generator with a dark, calm ocean-studio theme. The page shows a live animated preview of layered sine waves filling a panel like liquid, with the exportable code underneath.

Rules:
1. Controls: range sliders for wave count (1-5), amplitude, crests per width, fill level (percent) and loop speed in seconds. Add three color pickers (back wave, front wave, background), checkboxes for a fill-up intro and alternating wave direction, four named color presets, a Randomize button and a Pause/Play button. Every change updates the preview instantly without restarting the drift.
2. Draw each wave as one SVG path twice the viewBox width, with a period that divides the width evenly. Loop it with a CSS translateX keyframe so the motion is seamless, and give each layer a different duration and opacity for depth.
3. Export panel with SVG and CSS tabs. The SVG tab is a standalone animated SVG with an embedded style block, and the CSS tab has rules for inline use. Add a Copy button with a clipboard fallback and a file-size readout.
4. Use a two-column layout above 900px and stack it below that. Use labeled controls, visible focus rings and keyboard shortcuts: P to pause and R to randomize.
5. Include a prefers-reduced-motion rule in both the preview and the export that stops the animation.
6. Use no external libraries, fonts, network calls or storage.

Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen

Example: Tidewright, a live SVG wave and liquid fill background generator.

Use the sliders to set wave count, amplitude, crests, fill level and loop speed, and watch the preview update without stuttering. Pick a preset such as Lagoon, Sunset, Mint or Ink, or press R to randomize and P to pause. Switch between the SVG and CSS tabs and hit Copy to grab code that runs on its own. Try turning on Fill-up intro and pressing Replay fill.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Each path is twice the viewBox width with a period that divides it evenly, so a single translateX loop never shows a seam.
  • A negative animation-delay based on elapsed time keeps the drift continuous while sliders rebuild the SVG.
  • The preview renders the exact markup that gets exported, so the copied code always matches what you saw.

Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as tidewright.html and open it in any browser, or run it in the chat's preview or canvas panel. Then copy the exported SVG or CSS into your own site.

Common edits

  • Swap the presets for your brand colors or add a fourth color picker for a gradient fill on the front wave.
  • Add a gentle vertical bob keyframe or a soft Web Audio water hum with a mute toggle for a more ambient feel.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Animations & Effects