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.
The prompt
Act as a senior front-end developer and motion designer. Build a polished website hero header called Prism Signal for a fictional design studio named Halcyon Works. The centerpiece is a huge headline, Make it glow., filled with a slowly shifting multi-stop gradient clipped to the text, plus a subtle glitch flicker. Every few seconds, cyan and magenta offset slices briefly jump across the letters, then settle. Rules: 1) Include a small nav bar, an eyebrow line, the headline, a one-sentence subhead and two call-to-action buttons, all with real-sounding studio copy. 2) Add a compact control panel with three preset buttons (Aurora, Ember, Neon) that swap the gradient, background glow and glitch colors through CSS custom properties, with smooth color transitions. 3) Add toggles for Motion and Glitch, plus a Glitch now button. Clicking the headline also triggers a burst. Keys 1, 2 and 3 pick presets, M toggles motion and G toggles glitch. 4) Respect prefers-reduced-motion: start with motion off, freeze the gradient, and replace the flicker with a static offset ghost layer. 5) Use semantic HTML, aria-pressed on toggles, a polite live status line, visible focus rings and strong contrast. 6) Make the layout fluid from 360 to 1280px using clamp() type sizes, and use no external assets. 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
- CSS custom properties drive every color, so presets swap cleanly with a single data attribute and smooth transitions.
- The glitch uses pseudo-element copies with clip-path slices, which keeps the headline real, selectable text that screen readers can read.
- An explicit reduced-motion state with a static fallback means the header still looks designed when animation is off.
Paste into ChatGPT, Claude or Gemini. Save the returned code as prism-signal.html and open it in any browser, or view it in the chat's preview or canvas panel.
Common edits
- Change the headline, studio name and preset colors to match your brand, then add a fourth preset by copying one CSS block.
- Make the glitch rarer or stronger by adjusting the random delay range and the translate offsets in the keyframes.
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 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 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.
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 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.