obrm / weather-widget

Weather Widget is a simple app built with React, TypeScript, SCSS & Vite, displaying weather for six locations using mock data. Designed for responsiveness, it adapts to various screen sizes on desktops, laptops, tablets & smartphones. Two versions of App.tsx & WeatherCard.tsx showcase different design patterns.

Home Page:https://obrm-weather-widget.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weather Widget App

Weather Widget is a basic and simple web application that displays weather for six locations using mock data from weatherData.ts. It's built with React, TypeScript, SCSS and Vite. The application is designed with responsiveness in mind, ensuring that the layout and components adapt seamlessly to different screen sizes and orientations, providing an optimal user experience on a variety of devices, including desktops, laptops, tablets and smartphones. There are three versions of the App.tsx and WeatherCard.tsx files, showcasing different design patterns. In this repo you will find two more branches: with-compound-v1, with-compound-v2.

Version 1 (under the master branch): Standard Components

In this version, the WeatherCard component receives a cityWeather prop and directly utilizes sub-components like City, WeatherIcon, WeatherName, and Temperature.

Version 2: Compound Components version 1 (under the with-compound-v1 branch):

In this version the WeatherCard component accepts a weather prop and children components. In the App component, child components are included as children of the WeatherCard component.

Version 3: Compound Components version 2 (under the with-compound-v2 branch):

In this version the WeatherCard component accepts a weather prop and children components. In the App component, a single WeatherCardContent child component is included as children of the WeatherCard component.

Screenshots

Desktop View

Weather Widget App - Desktop View

Mobile View

Weather Widget App - Mobile View

Live Demo

Experience the Weather Widget App in action by visiting the live demo:

Weather Widget Live Demo

Installation

To set up the Weather Widget App locally, follow these steps:

  1. Ensure you have Node.js and Git installed on your machine.
  2. Clone the repository:
git clone https://github.com/obrm/weather-widget.git
  1. Navigate to the project directory:
cd weather-widget
  1. Install the required dependencies:
npm install
  1. Start the development server:
npm run dev

The application should now be running at http://localhost:5173.

Usage

To use the Weather Widget App, simply open it in your browser. The application will display the weather for six locations, with data sourced from the weatherData.ts file.

The app is responsive, providing a seamless experience on both desktop and mobile devices. Resize your browser window to see the layout adapt to different screen sizes.

Technologies Used

License

MIT

Contact Information

For any questions, concerns, or support, feel free to reach me out via email: obrm770@gmail.com.

About

Weather Widget is a simple app built with React, TypeScript, SCSS & Vite, displaying weather for six locations using mock data. Designed for responsiveness, it adapts to various screen sizes on desktops, laptops, tablets & smartphones. Two versions of App.tsx & WeatherCard.tsx showcase different design patterns.

https://obrm-weather-widget.netlify.app


Languages

Language:TypeScript 59.4%Language:SCSS 31.4%Language:JavaScript 4.8%Language:HTML 4.5%