1.0.4 • Published 2 years ago

@andreasrisager/darkmode v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

DarkMode

MAKE YOUR WEBSITE CHANGE BETWEEN DARK MODE OR LIGHT MODE WITH LOCALSTORAGE

USAGE

Install with npm i @andreasrisager/darkmode

Get Started

Javascript
import darkMode from "./node_modules/@andreasrisager/darkmode/index.js";

darkMode();
HTML
<label class="theme-switch" for="darkmode">
    <input type="checkbox" id="darkmode">
    Dark Mode
</label>

<script type="module" src=""></script>
CSS
[data-theme="dark"] {
    color: #e9e9e9;
    background-color: #1E1E1E;
}

License

MIT

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago