Skip to content
Basic demo on how to switch styles with Tailwind, handy for dark mode type purposes.
Branch: master
Clone or download
Latest commit 4869922 May 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public init 🥳 May 21, 2019
.gitignore init 🥳 May 21, 2019
README.md title change May 22, 2019
package.json init 🥳 May 21, 2019
postcss.config.js init 🥳 May 21, 2019
tailwind.config.js init 🥳 May 21, 2019

README.md

Tailwind Dark Mode Theme Switcher

Basic demo on how to switch styles with Tailwind, handy for dark mode type purposes.

Live preview: https://wonderful-minsky-9a45cf.netlify.com/

This is a mashup of Adam Wathan's Theming Tailwind Demo, Tailwind CSS Playground, and Katie Ball's Quick switch Themes with javascript.

To get started

  1. Clone the repository:

    git clone https://github.com/huphtur/tailwind-theme-switcher
    
    cd tailwind-theme-switcher
  2. Install the dependencies:

    # Using npm
    npm install
    
    # Using Yarn
    yarn
  3. Start the development server:

    # Using npm
    npm run serve
    
    # Using Yarn
    yarn serve

    Now you should be able to see the project running at localhost:8080.

Building for production

Both Purgecss and cssnano are included to optimize your CSS for production.

To build an optimized version of your CSS, simply run:

# Using npm
npm run production

# Using Yarn
yarn production

After that's done, check out ./public/build/styles.css to see the optimized output.

You can’t perform that action at this time.