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.

The prompt

Prompt
Act as a senior UI motion designer who writes clean, accessible front-end code.

Build Skyline Glyphs, a showcase page for five animated weather icons: sun, rain, snow, storm and wind. Each icon is pure inline SVG on a 64 by 64 viewBox with stroked line art and no fills. All motion comes from CSS keyframes only.

Rules:
1. Animations: the sun's rays rotate slowly while its core gently pulses. Rain drops fall and fade in a staggered loop. Snowflakes drift down with a slight sway and spin. The storm bolt flickers twice, then holds. The wind gusts flow using an animated stroke-dashoffset.
2. Controls panel: a size slider from 48 to 160 px and a stroke weight slider, each with a live value label. Add five color swatch buttons using aria-pressed. Drive everything with CSS custom properties so all icons update instantly.
3. Reduced motion: under prefers-reduced-motion, show complete static versions where every drop, flake and gust stays visible. Also add a visible Pause or Play motion toggle and a status line that says which mode is active.
4. Layout: a responsive card grid that fits 360 to 1280 px. Each card shows the icon, its name and a one-line caption. Use a calm light palette with readable contrast and a clear type scale.
5. Accessibility: every SVG gets role img and a title, controls are keyboard reachable with visible focus rings, and nothing external is loaded.

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: Skyline Glyphs, a live set of animated SVG weather icons.

Five cards show a spinning sun, falling rain, drifting snow, a flickering storm bolt and flowing wind gusts.

  • Drag Size and Stroke weight to resize and re-line every icon at once.
  • Click a color swatch to recolor the whole set.
  • Press Pause motion to preview the static reduced-motion versions.

If your system already prefers reduced motion, the page starts out still.

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

Tips and common edits

Why this works

  • Inline SVG with currentColor and CSS variables lets one slider or swatch restyle every icon with no redraw logic.
  • Static resting states are designed first, so turning motion off never leaves invisible drops or half-drawn gusts.
  • Keyframes use only transform, opacity and dashoffset, so the motion stays smooth and cheap on phones.

Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as skyline-glyphs.html and open it in any browser, or view it in the chat's preview or canvas panel.

Common edits

  • Add icons such as fog, partly cloudy or a moon by asking for two more cards that follow the same stroke style.
  • Switch to a dark stage with light strokes, or slow every loop down by changing the animation durations.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Animations & Effects