Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emrocode/darkify-js
:new_moon_with_face: Easy dark mode for your site
https://github.com/emrocode/darkify-js
color-scheme dark-mode dark-theme data-theme easy-to-use frontend modo-oscuro toggle web
Last synced: 7 days ago
JSON representation
:new_moon_with_face: Easy dark mode for your site
- Host: GitHub
- URL: https://github.com/emrocode/darkify-js
- Owner: emrocode
- License: mit
- Created: 2022-11-25T13:57:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-03T15:54:43.000Z (8 months ago)
- Last Synced: 2024-05-05T05:41:37.856Z (7 months ago)
- Topics: color-scheme, dark-mode, dark-theme, data-theme, easy-to-use, frontend, modo-oscuro, toggle, web
- Language: TypeScript
- Homepage: https://stackblitz.com/edit/demo-darkifyjs1?file=index.js
- Size: 39.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Darkify JS
🌚 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