JSPM

@andreasrisager/darkmode

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q43397F
  • License MIT

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

Package Exports

  • @andreasrisager/darkmode

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@andreasrisager/darkmode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

DarkMode

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


UsageGet StartedLicense



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