Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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/)