A comprehensive, responsive weather application built with vanilla HTML, CSS, and JavaScript. Features real-time weather data, location search, favorites system, and delightful animations.
- Location Search: Search for weather information by entering any location
- Current Weather: Temperature, weather icon, and location details
- Weather Metrics: "Feels like" temperature, humidity, wind speed, precipitation
- 7-Day Forecast: Daily high/low temperatures with weather icons
- Hourly Forecast: Temperature changes throughout the day with day selector
- Units System: Toggle between Imperial/Metric units with granular control
- Responsive Design: Optimal layout for mobile, tablet, and desktop
- Interactive States: Hover and focus states for all interactive elements
- Geolocation Support: Automatic current location detection
- Favorites System: Save and quickly access frequently checked locations
- Dark/Light Mode: Automatic theme switching based on time of day
- Weather Animations: Dynamic backgrounds and particles based on conditions
- Additional Data: UV index, visibility, air pressure, sunrise/sunset times
- Accessibility: Full keyboard navigation, screen reader support, reduced motion
- Performance: Debounced search, efficient DOM updates, optimized animations
| Desktop view | Mobile view |
|---|---|
![]() |
![]() |
- Clone or download the project files
git clone https://github.com/Ayokanmi-Adejola/Weather-App - Open
index.htmlin a modern web browser - Allow location access for automatic weather detection (optional)
- Start exploring weather data for any location!
- Open-Meteo Weather API: Free weather data with no API key required
- Open-Meteo Geocoding API: Location search and coordinates
- Chrome 90+ | Firefox 88+ | Safari 14+ | Edge 90+
- Vanilla JavaScript: No frameworks, pure ES6+ features
- CSS Custom Properties: Consistent design system
- Semantic HTML: Accessible and SEO-friendly structure
- Progressive Enhancement: Works without JavaScript for basic content
- Mobile: 320px - 768px (Touch-optimized interface)
- Tablet: 768px - 1024px (Hybrid layout)
- Desktop: 1024px+ (Full feature set)
- Keyboard Navigation: Full keyboard support for all interactions
- Screen Reader Support: Proper ARIA labels and semantic HTML
- High Contrast Mode: Enhanced visibility for visual impairments
- Reduced Motion: Respects user's motion preferences
- Skip Links: Quick navigation for assistive technologies
- Neutral Palette: 9 shades from
hsl(243, 96%, 9%)tohsl(0, 0%, 100%) - Accent Colors: Blue
hsl(233, 67%, 56%)and Orangehsl(28, 100%, 52%) - Weather Themes: Dynamic backgrounds based on weather conditions
- Primary Font: DM Sans (300, 500, 600, 700)
- Display Font: Bricolage Grotesque (700)
- Base Size: 18px with responsive scaling
- Consistent Scale: 0.5rem to 4rem using CSS custom properties
- Grid System: CSS Grid for responsive layouts
- Component-based: Reusable card and button components
- Temperature and "feels like" temperature
- Weather description with animated icon
- Humidity, wind speed, precipitation
- UV index, visibility, air pressure
- Sunrise and sunset times
- Daily: 7-day forecast with high/low temperatures
- Hourly: 24-hour detailed forecast with day selector
- Add icon files to
assets/images/ - Update
WEATHER_CODESobject inscript.js - Map weather codes to new icons
- Update CSS custom properties in
:rootand[data-theme]selectors - Add theme variants in theme management system
- Modify API parameters in
getWeatherDatafunction - Update display functions for new data
- Add corresponding HTML elements and CSS styles
- Debounced Search: Reduces API calls during typing
- Efficient DOM Updates: Minimal reflows and repaints
- Optimized Animations: Uses
requestAnimationFrameand CSS transforms - Lazy Loading: Weather particles created on demand
- Local Storage: Caches user preferences and favorites
- Weather particles may impact performance on older devices
- Some weather data may not be available for all locations
- Geolocation requires HTTPS in production environments
- API rate limits may apply for excessive usage
- Weather alerts and notifications
- Historical weather data visualization
- Interactive weather maps
- Social sharing capabilities
- Offline support with service workers
- Weather widgets for embedding
- Multi-language support
- Weather-based recommendations
weather-app-main/
βββ index.html # Main HTML file
βββ styles.css # Complete CSS with design system
βββ script.js # JavaScript functionality
βββ assets/
β βββ images/ # Weather icons and UI assets
βββ style-guide.md # Design specifications
βββ README.md # This file
- Frontend Mentor: Original challenge and design inspiration
- Open-Meteo: Free weather API with comprehensive data
- Google Fonts: Typography (DM Sans, Bricolage Grotesque)
- Community: Feedback and support during development
- Location not found: Try different search terms or check spelling
- Weather data not loading: Check internet connection and browser console
- Geolocation not working: Ensure HTTPS and location permissions
- Performance issues: Disable animations in accessibility settings
Check the browser developer tools console for detailed error messages and debugging information.
This project was built as a solution to the Frontend Mentor Weather App Challenge.
Challenge completed with enhanced features beyond requirements:
- β All original requirements implemented
- π Additional features: Geolocation, Favorites, Themes, Animations
- βΏ Enhanced accessibility and performance
- π± Improved responsive design


