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
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
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 like this
Build Animated SVG Weather Icons With Size and Color Controls in One HTML File
You get one HTML file with five animated inline SVG weather icons (sun, rain, snow, storm, wind), live size, stroke and color controls, and static reduced-motion versions.
Build a Gallery of Ten Looping Pure-CSS Loading Spinners in One HTML File
You get a single HTML page showing ten original pure-CSS loading animations in a tidy grid, each with a reveal-and-copy code snippet.
Build a Self-Drawing SVG Lighthouse Line Animation in One HTML File
You get a single HTML page where a hand-built SVG lighthouse draws itself stroke by stroke with staggered timing, then fades in its colors, with replay and speed controls.
Build an Animated Gradient Glitch Title Hero Header in One HTML File
A ready-to-paste prompt for a website hero header with a shifting gradient headline, a subtle glitch flicker, three switchable color presets and a reduced-motion fallback.
Build an Animated SVG World Clock with Sweeping Hands and Five Time Zones
A single HTML file with a crisp SVG analog clock whose hands glide continuously and ease smoothly between five world cities, each with a labeled UTC offset.
Build a Button Micro-Interaction Showcase with Ripple, Magnetic Hover and Checkmark
You get one self-contained HTML page with three accessible button micro-interactions: ripple, magnetic hover and a success checkmark. Each card has a copyable standalone code snippet.