TailwindCSS and Next Themes #3103
Replies: 1 comment
-
Hey! This is currently not possible to support more than the Note that this variant generates an incredibly large amount of utilities, and adding more "theme" variants would do just the same to another level. You're probably better off using CSS custom properties (CSS variables) to define your colours in the config file, and then redefine these colors within a parent class scope, as in this example: https://github.com/adamwathan/theming-tailwind-demo You can then use Next Themes to apply that class name to a container element to trigger color changes 👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys!
I've just set up my project again for enabling dark mode with Next Themes. This is incredibly easy using Tailwind's Dark Mode since it's basically adding the class
dark
to stuff. But what got me thinking is that with Next Themes I have the opportunity of having more than just light and dark mode, see more here. How can I enable this with Tailwind? Any idea?Beta Was this translation helpful? Give feedback.
All reactions