Build a Gallery of 12 Pure-CSS Loading Spinners with Copyable Code
You get a single HTML page showing 12 live CSS-only loaders, each with its own isolated CSS, a copy button, and a reduced-motion fallback that pulses gently instead of spinning.
The prompt
Act as a senior front-end developer who builds clean, accessible UI component libraries.
Build Spinwell, a single-page gallery of 12 pure-CSS loading spinners. The loaders are ring, dual ring, bouncing dots, equalizer bars, ripple, orbit, flipping square, conic gradient arc, clock, fading grid, indeterminate progress bar and hourglass. Each card shows the loader running live in a preview area, its name with a one-line description, a Copy button, and a scrollable dark code panel with that loader's HTML and CSS.
Rules:
1. Each loader uses one class prefix such as ld-ring, has its own uniquely named keyframes, uses no JavaScript, and includes role status with an aria-label of Loading in its markup.
2. Every snippet ends with its own prefers-reduced-motion media query that replaces the movement with a slow opacity pulse. Add a header toggle button with aria-pressed that previews this fallback, plus a line saying whether the visitor's system currently requests reduced motion.
3. Copy uses the Clipboard API, falls back to execCommand, and finally selects the code text. The button says Copied for two seconds and an aria-live region announces it.
4. Use a responsive auto-fill card grid that fits 360 to 1280px wide, a light page, indigo, teal and orange accents, a clear type scale and visible focus outlines.
5. Use no external fonts, libraries, images 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
- One class prefix and unique keyframes per loader keep every snippet isolated, so the copied code works on its own.
- The reduced-motion pulse is built into each snippet, which makes the loaders accessible by default instead of as an afterthought.
- A three-step copy fallback (Clipboard API, then execCommand, then selecting the text) still works inside sandboxed previews.
Paste into ChatGPT, Claude or Gemini. Save the returned code as spinwell.html and open it in any browser, or run it in the chat's preview or canvas. Copy any loader straight into your own project.
Common edits
- Swap the indigo, teal and orange hex values in the prompt for your brand colors, or ask for a dark-mode page.
- Add a speed slider that sets a CSS custom property for animation duration across all twelve loaders.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
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 Page Transition Demo with Wipe, Curtain and Morph Effects in One HTML File
A single HTML file that simulates a four-page website and animates every page change with wipe, curtain or morph transitions, plus an adjustable duration and a reduced-motion crossfade.
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 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 Nonprofit Impact Stats Counter Section in One HTML File
Get a polished nonprofit impact section where six key figures count up with easing on scroll, with formatted thousands, percentages and currency plus believable captions.
Build a Parallax Starfield Night Sky Hero Section on Canvas in One HTML File
A prompt that produces a single HTML hero section with a three-layer canvas starfield, pointer and tilt parallax, shooting stars, a density slider and a calm mode.