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

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

One HTML file. Save it and open it in any browser.Open full screen

Example: Tidewater Focus, an ocean-toned Pomodoro timer.

Press Start or Space to begin a 25-minute focus session and watch the SVG ring drain. Finishing a session fills a cycle dot and plays a soft chime. Every fourth session leads into a 15-minute long break. Use R to reset, S to skip, 1/2/3 to switch modes and M to mute. Turn on Demo speed to see a full cycle in seconds.

Written by AI from this prompt. Your results will vary.

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 in Mini Apps & Tools