Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/burnworks/tailwindcss-dark-mode-switch
Dark Mode/Light Mode switcher with Tailwind CSS
https://github.com/burnworks/tailwindcss-dark-mode-switch
dark-mode dark-mode-switch dark-mode-toggle tailwindcss
Last synced: about 2 months ago
JSON representation
Dark Mode/Light Mode switcher with Tailwind CSS
- Host: GitHub
- URL: https://github.com/burnworks/tailwindcss-dark-mode-switch
- Owner: burnworks
- License: mit
- Created: 2022-12-24T02:52:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-25T09:06:14.000Z (about 2 years ago)
- Last Synced: 2024-01-28T01:20:21.846Z (12 months ago)
- Topics: dark-mode, dark-mode-switch, dark-mode-toggle, tailwindcss
- Language: Astro
- Homepage: https://burnworks.github.io/tailwindcss-dark-mode-switch/
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tailwind CSS Dark Mode Switch
Dark Mode/Light Mode switcher with [Tailwind CSS](https://tailwindcss.com/).
## Required Package
- Tailwind CSS
### Install Tailwind CSS
```shell
npm install -D tailwindcss
npx tailwindcss init
```### Configure toggling dark mode manually
Add `darkMode: 'class'` to tailwind.config.js
```js
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
// ...
}
```## Usage
- Astro -> [Astro Sample](astro/)
- Pug -> [Pug Sample](pug/)## Demo
- [demo page](https://burnworks.github.io/tailwindcss-dark-mode-switch/)