An open API service indexing awesome lists of open source software.

https://github.com/sanjaraiy/toggle_btn

This repository features a React-based Toggle Button for enabling dark mode. Switch effortlessly between light and dark themes with style! 🚀🎨
https://github.com/sanjaraiy/toggle_btn

html5 javascript reactjs tailwind-css toggle-buttons vite

Last synced: 28 days ago
JSON representation

This repository features a React-based Toggle Button for enabling dark mode. Switch effortlessly between light and dark themes with style! 🚀🎨

Awesome Lists containing this project

README

          

# Toggle Feature In React.js
This project is built on `JavaScript`, `Tailwind CSS` and `React.js` .It is useful for enabling the dark and light mode feature in the React created card.

## Install Vite :-
```
npm latest@vite
```
## NPM Json Package Install :-
```
npm install
```
## Tailwind Install Link :-
```
npm install -D tailwindcss
npx tailwindcss init
```
## Tailwind Configure your template paths :-
```
module.exports = {
content: ["./src/**/*.{html,js}"],
theme: {
extend: {},
},
darkMode:"class",
plugins: [],
}
```
## Add the Tailwind directives to your CSS :-
```
@tailwind base;
@tailwind components;
@tailwind utilities;
```
## Install React-Redux :-
```
npm i react-redux
```