tailwind-dark-mode-code
v1.0.0
Published
Example in react:
Downloads
5
Maintainers
Readme
tailwind-dark-mode-code
Example in react:
const darkModeCode = require('tailwind-dark-mode-code')
//...
<script dangerouslySetInnerHTML={{ __html: darkModeCode }} />
//...
Features
- Automatically set
<html class="dark">
if the client OS is in dark mode. - Automatically update the former class when the client changes the mode when using the website.
- Compatible with Tailwind built-in theme changer (using LocalStorage).
Author
| | | ---------------------------------------------------------------------------- | | Pablo Varela |