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.
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. Build "Tidewater Focus", a calm, ocean-toned Pomodoro timer as a single self-contained HTML page. It runs 25-minute focus sessions and 5-minute short breaks, with a 15-minute long break after every fourth completed focus session, and moves to the correct next mode on its own.
Rules:
1. Show the remaining time inside a circular SVG progress ring that drains smoothly. Give each mode its own accent color: coral for focus, teal for the short break, periwinkle for the long break. Use a dark navy background with readable contrast.
2. Controls: Start/Pause, Reset, Skip, and three mode tabs. Keyboard shortcuts: Space to start or pause, R to reset, S to skip, 1/2/3 to switch mode, M to mute and C to clear the count. Show a visible shortcut legend.
3. Track completed sessions in memory only. Show four cycle dots, the total count and the minutes focused, with a Clear button that resets everything cleanly. No localStorage, cookies or network.
4. When a session ends, play a soft three-note Web Audio chime. Create the audio context on the first interaction, keep the volume low and include a visible mute toggle.
5. Time against performance.now so the timer never drifts. Update the tab title and announce mode changes in an aria-live region. Add an Auto-start next toggle and a Demo speed toggle that counts seconds instead of minutes.
6. Fit any width from 360 to 1280px, turn off the ring animation under prefers-reduced-motion, and use no alerts or 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
- Timing against performance.now with a stored end time keeps the countdown accurate even when the tab throttles timers.
- Keeping state in memory only means it runs in any sandbox, and Clear resets the counter without touching storage.
- The audio context is created on the first interaction, so the chime is never blocked by browser autoplay rules.
Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as tidewater-focus.html and open it in any browser, or run it in the chat's preview or canvas panel. It works fully offline.
Common edits
- Change the durations (for example 50/10/20) and the long-break interval in the MODES settings and the cycle check.
- Swap the palette for a forest or sunset theme, or give the chime different notes for each mode.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
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 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.
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 Weekly Habit Tracker Grid with Streak Counts in One HTML File
Generates a single-file weekly habit tracker where you tap day cells to check off habits, watch streaks and completion percentages update live, and copy a plain-text summary.
Build an Instant Two-Way Unit Converter With Kitchen Measurements in HTML
A prompt that produces a single-file unit converter for length, weight, temperature, volume and cooking that updates both directions as you type, including cups-to-grams by ingredient.
Build a BMI and Daily Calorie Calculator with Metric and Imperial Units in HTML
A prompt that makes an AI build Steady Scale, a single-file BMI and calorie calculator using Mifflin-St Jeor, activity levels, unit switching and plain-language ranges.