Skip to content

TailwindCSS plugin for theming. Supports configurable selectors, media queries, and utility defaults.

Notifications You must be signed in to change notification settings

mia-cx/tailwindcss-themes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Tailwind plugin for theming. Provide media queries and/or multiple selectors, and variants for each theme will be generated!

Heavily inspired and massively enabled by JNavith/tailwindcss-theme-variants

Getting Started

pnpm i -D @mia-cx/tailwindcss-themes
// tailwind.config.js
const themes = require('@mia-cx/tailwindcss-themes');

module.exports = {
  // ...
  plugins: [
    // ...
    themes({
      themes: {
        light: {
          selectors: '.light',
        },
        dark: {
          selectors: '.dark',
        },
      },
      baseSelector: ':root',
      fallback: 'dark',
    }),
  ],
  // ...
};

To Do

  • Add auto-generated utilities based on each theme's theme definition.

About

TailwindCSS plugin for theming. Supports configurable selectors, media queries, and utility defaults.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project