https://github.com/emrocode/darkify-js
🌚 A simple dark mode toggle library
https://github.com/emrocode/darkify-js
automatic-theme color-scheme dark-mode darkify darkify-js light-mode night-mode npm-package theme-switcher theme-toggle typescript
Last synced: about 2 months ago
JSON representation
🌚 A simple dark mode toggle library
- Host: GitHub
- URL: https://github.com/emrocode/darkify-js
- Owner: emrocode
- License: mit
- Created: 2022-11-25T13:57:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-07T18:29:42.000Z (7 months ago)
- Last Synced: 2025-10-20T18:44:39.892Z (6 months ago)
- Topics: automatic-theme, color-scheme, dark-mode, darkify, darkify-js, light-mode, night-mode, npm-package, theme-switcher, theme-toggle, typescript
- Language: TypeScript
- Homepage: https://npm.im/darkify-js
- Size: 385 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Darkify JS
[](https://github.com/emrocode/darkify-js/actions/workflows/tests.yml)
🌚 A simple dark mode toggle library that makes it easy to implement dark mode on your website without additional configuration
> Please make sure to read the [Wiki] for detailed documentation and examples
### 📦 Installation
Use npm or any other package manager:
```bash
npm install darkify-js
```
### ⚙️ Setup
```js
// main.js
import Darkify from 'darkify-js';
const options = {
autoMatchTheme: true,
};
// autoMatchTheme: default is true
// useLocalStorage: default is true
// useSessionStorage: default is false
// useColorScheme: default is ['#ffffff', '#000000']
new Darkify('#element', options);
```
[Wiki]: https://github.com/emrocode/darkify-js/wiki