dark-mode-tailwind
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

TAILWIND-DARK-MODE

Easy way to implement dark mode for an existing TailwindCSS project

Easy way to implement dark mode for an existing TailwindCSS project.

Setup

// file = tailwind.config.js
import addUtilitesWithDarkMode from 'dark-mode-tailwind'

export default {
   content: {
      files: ["./index.html","./src/**/*.{js,ts,jsx,tsx}",], //your usual path for tailwind
   },
   /* Your rest tailwind config */
   darkMode: 'class',
   plugins: [
      /* Your rest tailwind plugins */
      plugin(addUtilitesWithDarkMode(({ addUtility }) => {
         addUtility('bg', 'background-color', {
            black: ['#222222', '#eee']
         })
      }))
   ],
}

Package Sidebar

Install

npm i dark-mode-tailwind

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

7.6 kB

Total Files

7

Last publish

Collaborators

  • lukasz17