A modern, responsive weather app built with HTML, Tailwind CSS, and TypeScript. It instantly fetches real-time weather, air quality, and more for any city worldwide, featuring a beautiful blue-gradient glassmorphism UI with smooth animations, interactive search history, and a seamless user experience.
- 🌍 Global Read-Time Weather: Get current weather, temperature, humidity, wind, pressure, and visibility for any city worldwide
- 🕑 Local Time: Displays local date and time for the selected city
- 💧 Weather Details: Humidity, wind speed, visibility, and pressure
- 🍃 Air Quality Index: Live AQI with color-coded backgrounds and health labels
- 🕑 Search History: Quick access to your recent city searches dropdown and easy removal.
- 🎨 Modern UI: Elegant, glassy UI with animated transitions, glassmorphism, gradients, and smooth animations
- 📱 Fully Responsive: Works beautifully on desktop, tablet, and mobile
- 🔄 Unit Toggle: Instantly switch between Celsius and Fahrenheit.
- ⚡ Fast & Lightweight: No frameworks or build tools required—just open and use! Minimal dependencies, instant results
- 🕘 Loading & Error Handling: Animated loading spinner, dismissible error popups, and friendly error messages for invalid cities
- Search: Enter a city name and click the search button or press Enter
- Toggle Units: Click the °C/°F button to switch temperature units
- View History: Click the History button to see recent searches
- Select from History: Click a city in the dropdown to reload its weather
- Remove from History: Click the × next to a city to remove it from history
- If a city is not found, a friendly error popup will appear
- Click the close (×) button to dismiss error messages
- HTML5: Semantic markup
- Tailwind CSS: Utility-first CSS framework via CDN
- TypeScript: Type-safe JavaScript for robust code
- Font Awesome: Icon library via CDN
- WeatherAPI.com: Real-time weather and air quality data
- Git – Version control
- GitHub – Code hosting and collaboration
- Clone the repository:
git clone https://github.com/pvm-harshavardhan/weather-app.git
- Change to the project directory:
cd weather-app - Compile TypeScript File:
tsc script.ts
- Open the app:
- Open
index.htmlin your web browser.
- Open
- Start searching for weather! ⛅
No build step or server required!
weather-app/
├── 📄 index.html # Main HTML file with Tailwind CDN
├── ⚡ script.ts # TypeScript logic for weather, UI, and history
├── ⚡ script.js # Compiled JavaScript output
├── 🖼️ favlogo.png # App favicon
- ✅ Chrome (recommended)
- ✅ Firefox
- ✅ Safari
- ✅ Edge
⚠️ Internet Explorer (limited support)
- Check your internet connection
- Ensure WeatherAPI key is valid and not rate-limited
- Check browser console for errors
- Verify file paths in the code
- Make sure Tailwind CSS CDN is accessible
- Clear browser cache
- The app is fully responsive
- Touch controls work on mobile devices
- Some mobile browsers may restrict auto-focus or popups
- Replace
favlogo.pngwith your own logo if desired - Add screenshots or GIFs to highlight features and UI
- Update colors and styles in Tailwind config or HTML classes
Deploy your Weather App easily using GitHub Pages, Netlify, or Vercel for free.
Contributions are welcome!
Feel free to open issues or submit pull requests to improve the app.
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name - @pvm_harsha
Project Link: Weather App Web Project
Made with ❤️ by [Your Name]
Enjoy the weather! ⛅🌦️🌈
