• Stars
    star
    188
  • Rank 205,563 (Top 5 %)
  • Language Liquid
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Tailwind Dark Mode Theme Switcher

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

Live preview: https://tailwind-theme-switcher.netlify.app/

This is a mashup of Adam Wathan's Theming Tailwind Demo, Hella Simple Eleventy + Tailwind CSS Starter, 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

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

# Using npm
npm run build

# Using Yarn
yarn build

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