Build a Beat-Synced Kinetic Typography Quote Animation in One HTML File
A prompt that produces Beatline, a single HTML page animating a short quote word by word on a tempo grid, with varied entrances, replay and a clean recording mode.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
Act as a senior motion designer and front-end developer. Build Beatline, a kinetic typography piece that animates the quote "Start before you feel ready. The rhythm finds you once you begin to move." word by word on a 16:9 stage, ready for screen recording.
Rules:
1. Time every word to a beat grid at a selectable tempo of 84, 100 or 120 BPM, driven by requestAnimationFrame and performance.now. Use a two-beat count-in, half-beat pickups and two-beat holds at line endings. Show a row of beat dots that light up on each beat, with bar starts marked.
2. Vary the entrances with the Web Animations API: scale-in with blur, slide up, slide left, slide right, bouncy drop, horizontal stretch, and split letters that rise with a stagger. Color key words coral or mint and add a soft glow pulse on them.
3. Controls: a Play/Replay button, a tempo toggle, a sound toggle, and a Hide controls mode that fills the window for recording. Keyboard: Space plays, 1 to 3 set the tempo, M toggles sound, H or Escape toggles clean mode. Clicking the stage also plays.
4. Synthesize a quiet metronome tick and a low thump on accent words with the Web Audio API. Create the audio context on the first interaction.
5. Use a dark palette and heavy system-font type scaled to the stage width. Keep contrast readable and the layout fitting 360 to 1280px wide. Under prefers-reduced-motion, use plain fades.
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
- Timing every word in beats, not milliseconds, means one tempo switch retimes the whole piece and keeps entrances on the grid.
- The Web Animations API with fill forwards gives crisp, cancelable entrances, and rebuilding the DOM on replay starts each run clean.
- A clean mode sized to the window's 16:9 area gives a recording-ready frame without any editing.
Paste into ChatGPT, Claude or Gemini. Save the code as beatline.html and open it in a browser, or run it in the chat's preview or canvas. Press H before recording to hide the controls.
Common edits
- Swap the quote and change each word's fx, beats and color class in the word list to choreograph your own line.
- Add a fourth tempo or a swing feel by changing the half-beat pickups, or remove the tick sound for a silent export.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Build a CSS Cubic-Bezier Easing Curve Visualizer with Draggable Handles
A single HTML file with a draggable bezier curve editor that races test boxes against CSS built-in easings and gives you a ready-to-paste cubic-bezier value.
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 Headline Text Reveal Playground in a Single HTML File
A one-file playground where you type a headline, preview typewriter, letter stagger, mask wipe or scramble reveals, and copy clean code for the chosen effect.
Build a Click-to-Launch Fireworks Celebration Animation in One HTML File
A prompt that produces a single HTML page where clicks, taps or keys launch fireworks with gravity, fading trails, soft synthesized pops and a mute toggle.
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.