Published under TailwindCSS.
With one simple configuration file change, you can add dark mode support to your Tailwind website:
This will add a dark:
variant to Tailwind's classes. Whenever your user has dark mode enabled, the dark:
classes will be enabled.
There's more you can do with dark mode and Tailwind, all out of the box. I suggest you read the official documentation for more information.
Did you find this post useful? Let me know on Twitter! If you found an issue with the content, submit a pull request!
Subscribe to my newsletter to know when I publish more content in the future.