https://github.com/pablopunk/dark-mode-code
Automagically use dark mode detection on your website
https://github.com/pablopunk/dark-mode-code
Last synced: about 1 year ago
JSON representation
Automagically use dark mode detection on your website
- Host: GitHub
- URL: https://github.com/pablopunk/dark-mode-code
- Owner: pablopunk
- Created: 2020-07-02T15:11:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T20:53:21.000Z (over 3 years ago)
- Last Synced: 2025-03-29T17:35:56.272Z (about 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# dark-mode-code
Example in react:
```js
const darkModeCode = require('dark-mode-code')
//...
//...
```
## Features
* Automatically set `` if the client OS is in dark mode.
* Automatically update the former class when the client changes the mode when using the website.
* Expose a method to manually toggle the theme: `window.__toggleDarkMode()`
## Author
|  |
| ---------------------------------------------------------------------------- |
| [Pablo Varela](https://pablo.pìnk) |