Skip to content

Theme switcher in ReactJS by ContextAPI hook and CSS Variables

Notifications You must be signed in to change notification settings

Neha/react-theme-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Theme Switcher in ReactJS

This is working example of theme switcher in ReactJS by using Context API Hook and CSS Variables.

Demo of the theme switching

Files Strcuture

/components: For all reusable components

/pages: For pages

Walkthrough

/components/context.js : This file has the context of the theme

App.js: App.js has the provider of the theme and handling the logic of toggling the theme

assets/style/style.css: CSS Variables for the theme

How to use?

  • Download or clone the repo

  • run npm install

  • run npm start

  • Go to your localhost

⭐ Do you have something to add or improve? Don't hesitate to do contribution. ⭐

❤️ You can follow me at Dev, Twitter, Linkedin ❤️

About

Theme switcher in ReactJS by ContextAPI hook and CSS Variables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages