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
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
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 like this
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 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.
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 Dawn-to-Night Landscape Scene in a Single HTML File
You get one HTML file that draws a canvas valley village whose sky, sun, moon, stars, clouds and window lights all follow a single time-of-day scrubber with autoplay.
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.