A glassmorphic weather app with real-time data, 5-day forecast, and auto-location — built in pure HTML, CSS & JS.
Search any city · Auto-detect location · Live data · 5-day forecast
Full real-time weather for any city in the world, including:
| Field | Details |
|---|---|
| Temperature | Actual + feels like in °C |
| Condition | Description + animated emoji icon |
| Humidity | Percentage |
| Wind Speed | km/h |
| Pressure | hPa |
| Visibility | km |
| Sunrise & Sunset | Local city time |
One row per day showing high/low temperatures, condition icon, description, and a visual temperature bar that scales relative to the week — so you can instantly see the warmest and coolest days.
- Search — type any city name and press Enter or click Search
- Locate — one click uses your browser's GPS to fetch your current location automatically
All times (current time, date, sunrise, sunset) are shown in the searched city's local timezone — not yours.
- Floating weather emoji that gently bobs
- Glassmorphic cards with backdrop blur
- Smooth card entrance animations
- Spinner while data is loading
- Inline error messages for city not found or location denied
- Floating background orbs matching the series palette
Sign up at openweathermap.org — the free tier covers everything this app uses.
Open script.js and replace the key on line 1:
const API_KEY = 'your_api_key_here';
⚠️ New API keys take up to 10 minutes to activate after creation.
git clone https://github.com/heyfaraninam/Weather.git
cd weather
open index.htmlNo build step. No npm. No config.
weather/
├── index.html # Markup, search bar, current card, forecast card
├── styles.css # Glassmorphism, animations, forecast bars, stat grid
└── app.js # API calls, data rendering, geolocation, icon mapping
This app uses the OpenWeatherMap free tier:
| Endpoint | Used For |
|---|---|
/data/2.5/weather |
Current weather |
/data/2.5/forecast |
5-day / 3-hour forecast |
Both endpoints are free with no credit card required.
| Key | Action |
|---|---|
Enter in search field |
Search city |
| Browser | Support |
|---|---|
| Chrome 76+ | ✅ Full |
| Firefox 103+ | ✅ Full |
| Safari 14+ | ✅ Full |
| Edge 79+ | ✅ Full |
Requires backdrop-filter for glassmorphism and navigator.geolocation for the locate feature.
This is part of a growing collection of beautiful, zero-dependency web apps:
| Project | Description |
|---|---|
| Calculator | Glassmorphic calculator with 4 themes, scientific mode & history |
| Notes | Glassmorphic notes app with tags, pinning & instant search |
| Weather | This project |
MIT — free to use, modify, and ship.
Made with care · pure HTML · CSS · JS · no frameworks needed