Build an Animated Mesh Gradient Background Generator With CSS Export

Get a single HTML file that animates layered blurred color blobs into a mesh gradient, with live color pickers, speed and blur sliders, and one-click CSS export.

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 "Aurora Mesh Studio", a single-page generator for smooth animated mesh-style gradient backgrounds. The preview fills most of the screen. It shows four large circular CSS blobs, each heavily blurred with a CSS blur filter. They drift slowly over a dark base color, and each blob has its own keyframe loop with a different duration so the blend never visibly repeats. Rules:
1. Add a controls panel: on the right on desktop, below the preview on mobile. It holds four color pickers for the stops with their hex values shown, a base color picker, a speed slider (0.25x to 3x) and a blur slider (20 to 140px). All of them update the preview live.
2. Include four named presets, a Randomize button that builds a harmonious HSL palette, and a Pause/Play toggle. Add keyboard shortcuts: Space pauses, R randomizes, E exports.
3. An Export CSS button opens an accessible dialog with clean, commented CSS: the container class, blob rules, keyframes and a reduced-motion fallback. Add a Copy button that falls back to selecting the text.
4. Overlay a readable glass card on the preview with the title and the shortcuts.
5. Respect prefers-reduced-motion by starting paused with a short note. Escape closes the dialog.
6. Use no external libraries, fonts, network calls or storage. Keep all CSS and JS inline.
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: Aurora Mesh Studio, a live mesh gradient generator.

Four blurred color blobs drift over a dark base to form a soft, ever-shifting mesh gradient. Use the color pickers to change each stop, drag Speed and Blur, or try the Dusk, Lagoon, Ember and Meadow presets.

Press R to randomize, Space to pause and E to open the export dialog. Then click Copy CSS and paste the code into your own site with the four-span markup shown in the comment.

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

Tips and common edits

Why this works

  • Plain blurred circles with transform-only keyframes stay smooth on any device and need no canvas or library.
  • Different loop lengths per blob make the motion look organic instead of a visible repeat.
  • The page and the export are built from the same JS data, so the copied CSS matches the preview exactly.

Paste the prompt into ChatGPT, Claude or Gemini. Save the code as an .html file and open it in a browser, or use the chat's preview or canvas. Paste the exported CSS into any project.

Common edits

  • Change the default palette or add more presets by editing the PRESETS list, or raise the blob count to six for denser meshes.
  • Swap the export to output a CSS custom-properties version or Tailwind-style config for your design system.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Animations & Effects