Build a Countdown Timer to Any Date With a Confetti Finish in One HTML File
Get a polished single-file countdown page with a custom event title, a large days-hours-minutes-seconds display and a confetti-and-chime celebration at zero.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
Act as a senior front-end developer and product designer who builds small, polished web tools.
Build Moment Mark, a single-page countdown timer to a chosen date and time. The user types an event title, picks a date and time, and sees a large days, hours, minutes and seconds display that updates live. When it reaches zero, the page celebrates.
Rules:
1. Layout: a centered card with the event title as the main heading and the full target date written out below it. Show four equal tiles (Days, Hours, Minutes, Seconds) with oversized tabular numbers that scale from a 360px phone to a 1280px desktop. Put a settings panel underneath with a title field, a datetime-local field and a Start button. Do not use a form element.
2. Behavior: pre-fill a sample event about 12 days ahead so the page looks alive on first load. Pressing Enter in either field applies the changes. Show a friendly inline message for a missing or past time. Include a 10-second demo button and a +1 hour button.
3. Finish: show a status line saying the event has arrived, plus canvas confetti. Skip the confetti and the pop animation when prefers-reduced-motion is set.
4. Sound: use the Web Audio API to play soft blips during the last 5 seconds and a rising chime at zero. Create the AudioContext on the first user interaction, keep the volume low, and add a visible mute toggle.
5. Style: a dark navy palette with an amber accent and a sky-blue accent, a system font stack, high contrast and clear focus outlines.
6. Constraints: no external libraries, fonts, images, storage or network calls, and no alerts.
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
- A pre-filled sample event and a 10-second demo let you see the full countdown and the finish effect without any setup.
- Tabular numbers and clamp() sizing keep the digits steady and readable on any screen from a phone to a desktop.
- Audio that starts on the first interaction and confetti that respects reduced motion avoid browser blocks and accessibility problems.
Paste into ChatGPT, Claude or Gemini. Save the reply's code as moment-mark.html and open it in any browser, or preview it in the chat's canvas or artifact view. Click the 10-second demo to see the finish.
Common edits
- Swap the navy and amber palette for brand colors, or change the confetti colors to match the theme of a birthday, launch or holiday.
- Add a progress bar showing how much of the wait has passed, or a share line that copies the event name and date as text.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Build a HIIT and Tabata Interval Workout Timer in a Single HTML File
A self-contained interval timer with adjustable work, rest and rounds, color-coded phases, synthesized countdown beeps and a tap-anywhere pause, all in one HTML file.
Build a Keyboard-Friendly To-Do Checklist with Priorities and Filters in One HTML File
A ready-to-paste prompt that makes an AI build a single-file to-do checklist where you can add, reorder, prioritize, filter and export tasks as plain text, all with keyboard shortcuts.
Build a Pomodoro Focus Timer With SVG Progress Ring in One HTML File
A ready-to-paste prompt that builds a Pomodoro timer with focus, short and long break cycles, an SVG progress ring, a soft synthesized chime, keyboard shortcuts and a session counter.
Build a Random Team Picker That Splits Names Into Fair Groups in One HTML File
You get a single-file team picker: paste names, choose a team count or team size, watch an animated shuffle deal everyone into evenly sized teams, then reshuffle with one key.
Build a Restaurant Tip and Bill Splitter With Uneven Shares in One HTML File
A ready-to-paste prompt that builds a bill splitter where diners pay for what they ordered, tax and tip are shared fairly, totals round neatly, and every cent adds up.
Build a Strong Password Generator with Strength Meter in One HTML File
You get a single HTML file that makes cryptographically random passwords, with toggles for character sets, an entropy-based strength meter and one-click copy.