Skip to content

A modern, high-precision countdown timer built with Vanilla JavaScript and Vite, featuring seamless date picking and elegant UI notifications.

Notifications You must be signed in to change notification settings

halenurgurel/countdown-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⏳ Modern Countdown Timer

A sleek, responsive, and user-friendly countdown timer built with Vanilla JavaScript and Vite. This project allows users to select a future date and track the remaining time in days, hours, minutes, and seconds.

🚀 Features

  • Future Date Selection: Integrated with flatpickr for a smooth calendar experience.

  • Real-time Updates: Time calculates every second with precise accuracy.

  • Modern Notifications: Uses iziToast for beautiful, non-intrusive error alerts.

  • Responsive Design: Fully centered and styled with a soft, modern color palette using the Montserrat font.

  • State Management: The "Start" button and input field are intelligently disabled/enabled based on the timer's state.

🛠️ Tech Stack

  • Core: HTML5, CSS3, JavaScript (ES6+)

  • Bundler: Vite

  • Libraries:

📸 App Preview

Main Page Time Picking Ready to Start Countdown
mainPage timePicking LargeVersion LargeVersion

📦 Installation & Setup

  1. Clone the repository:
git clone https://github.com/halenurgurel/countdown-timer.git
  1. Navigate to the project directory:
cd countdown-timer
  1. Install dependencies:
npm install
  1. Run the development server:
npm run dev
  1. Build for production:
npm run build

📝 How It Works

The user selects a date using the input field.

If the date is in the past, an iziToast error appears and the "Start" button remains disabled.

Upon selecting a valid future date, the "Start" button becomes active.

Once started, the setInterval function calculates the difference between the current time and the target date using the convertMs() helper.

The UI updates every second until the countdown reaches zero.

👩‍💻 Author

Halenur Gürel – Asynchronous JavaScript & UI Library Integration 🚀

Live Demo 📍

🔗 GitHub Profile

🎯 “This project demonstrates how to handle complex asynchronous flows, manage local and future time states, and provide a polished user experience through custom-styled UI notifications and interactive elements.”

About

A modern, high-precision countdown timer built with Vanilla JavaScript and Vite, featuring seamless date picking and elegant UI notifications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published