A simple weather application built with React that allows users to search for current weather conditions in any city worldwide. The app displays temperature, humidity, wind speed, and location with corresponding weather icons.
- Real-time weather data from OpenWeatherMap API
- Search functionality for any city
- Dynamic weather icons based on conditions
- Responsive design
- Displays:
- Current temperature (°C)
- Humidity percentage
- Wind speed (km/h)
- Location name
- Clone the repository:
git clone https://github.com/your-username/weather-app.git
- Navigate to the project directory:
cd weather-app - Install dependencies:
npm install
- Start the development server:
npm start
The app uses OpenWeatherMap API. To use your own API key:
- Get an API key from OpenWeatherMap
- Replace the
api_keyvariable inWeatherApp.jswith your key:let api_key = "your-api-key-here";
- React
- React DOM
- CSS for styling
The app uses the following icons:
- Search icon
- Weather condition icons (clear, cloud, drizzle, rain, snow)
- Humidity icon
- Wind icon
- Enter a city name in the search bar
- Click the search icon or press Enter
- View current weather conditions for the searched location
/src
/Assets
- weather icons
/Components
- WeatherApp.js
- WeatherApp.css
This project is open source and available under the MIT License.
- Add 5-day forecast
- Implement geolocation for automatic local weather
- Add temperature unit toggle (Celsius/Fahrenheit)
- Improve error handling for invalid city searches
- Add animated weather icons
Weather data provided by OpenWeatherMap