GithubHelp home page GithubHelp logo

labcodes / css-modules-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 1.18 MB

This is a demo project using as an example for the blog post about Styled-Components & CSS Modules

HTML 34.67% CSS 13.42% TypeScript 51.90%

css-modules-demo's Introduction

CSS Modules Demo

Overview

This React project demonstrates the integration of CSS Modules for component styling and incorporates react-confetti for interactive UI effects. The main feature of this application is a button that, when clicked, changes the background color of the page and triggers a confetti animation, creating a visually engaging user experience.

Key Features

  • React with CSS Modules: The application showcases the use of CSS Modules for styling React components. This approach modularizes CSS by allowing styles to be defined in separate files and imported as JavaScript objects, ensuring style encapsulation and reducing the risk of style conflicts.
  • Interactive UI with Confetti Effect: Utilizing react-confetti version 6.1.0, the application creates a confetti explosion effect when the button is clicked, enhancing the interactivity of the UI.

Technologies Used

  • React
  • CSS Modules
  • react-confetti (version 6.1.0)

Running the Project Locally

To run this project on your local machine, follow these steps:

  1. Clone the Repository

    Clone the project repository to your local machine using:

    git clone [email protected]:labcodes/css-modules-demo.git
    
  2. Navigate to the Project Directory

    After cloning, move into the project directory:

    cd css-modules-demo
    
  3. Install Dependencies

    Install the necessary dependencies by running:

    npm install
    
  4. Start the Development Server

    Launch the development server with:

    npm start
    

    This will run the app in development mode. Open http://localhost:3000 to view it in your browser.

  1. Explore the App

    The page will reload if you make edits. You will also see any lint errors in the console.

Contributing

Feel free to contribute to this project by submitting pull requests or suggesting features or improvements.

css-modules-demo's People

Contributors

higormonteiro avatar

Watchers

José Carlos Menezes avatar Fernando Lins avatar Claudio Magalhães avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.