A responsive Pomodoro Timer web app built with plain HTML, CSS, and JavaScript.
This project uses a classic productivity cycle: (The Default durations can be customized.)
- 25 minutes focus
- 5 minutes short break
- After 4 focus sessions, a 30-minute long break
It also includes an alarm sound and a circular progress ring.
- Focus/Short Break/Long Break modes
- Start/Pause, Reset, and Skip controls
- Automatic cycle switching based on completed focus sessions
- Circular progress ring that updates every second
- Audio reminders (alarm) with volume slider
- Responsive layout for desktop and mobile
- HTML5 for structure and accessibility
- CSS3 for layout, responsive design, and visual styling
- Vanilla JavaScript (ES6+) for timer logic, state management, and audio
-
DOM manipulation
- Selecting elements with
querySelector/getElementById - Updating text and attributes dynamically
- Selecting elements with
-
Event handling
- Button click handlers (
Start,Reset,Skip) - Input events for the volume slider
- Button click handlers (
-
State management in JavaScript
- Tracking current mode (
focus,shortBreak,longBreak) - Tracking remaining time and completed sessions
- Keeping UI in sync with app state
- Tracking current mode (
-
Timers and intervals
- Using
setIntervalfor countdown behavior - Starting, pausing, and stopping timer loops safely
- Using
-
Conditional logic
- Triggering a long break after every 4 completed focus sessions
- Switching modes automatically
-
Working with SVG and progress visuals
- Building a circular progress ring
- Updating
stroke-dashoffsetto animate progress
-
Web Audio basics
- Creating alarm tones with the Web Audio API
- Controlling output volume from user input
-
Responsive UI design
- Using flexible units and media queries
- Designing for both mobile and desktop screens
pomodoro-timer/
├── assets/
│ └── ding-ding-sound-effect.mp3
│ └── icons8-pomodoro-50.png
├── index.html
├── styles.css
├── script.js
└── README.md
- Clone or download this repository.
- Open the project folder.
- Double-click
index.html(or open it with Live Server in VS Code).
No build tools or dependencies required.