bs-darkmode-toggle
v1.0.0
Published
Bootstrap Darkmode Toggle is a plugin for bootstrap to add a ligthmode/darkmode switch in to your app.
Maintainers
Readme
Bootstrap Darkmode Toggle
Bootstrap Darkmode Toggle is a plugin for bootstrap to add a light/dark mode switch in to your app.
Library Distributions
| Version | Bootstrap Support | Last Release |
| :-----: | :---------------: | :----------: |
| v1 | |
|
See EOL for each version in Security Policy Page.
Demo and documentation
Please read our documentation page for a completed usage explanation: https://palcarazm.github.io/bs-darkmode-toggle/
Installation
CDN
ECMAS Interface
<!-- Consider loading Bootstrap and Bootstrap 5 toggle dependencies -->
<script src="https://cdn.jsdelivr.net/npm/bs-darkmode-toggle@#version#/js/bs-darkmode-toggle.ecmas.min.js"></script>jQuery Interface
<!-- Consider loading Bootstrap, jQuery and Bootstrap 5 toggle dependencies -->
<script src="https://cdn.jsdelivr.net/npm/bs-darkmode-toggle@#version#/js/bs-darkmode-toggle.jquery.min.js"></script>Download
NPM
npm install bs-darkmode-toggle@#version#Yarn
yarn add bs-darkmode-toggle@#version#Usage
Initialize with HTML
Simply create a div with the data attribute data-plugin="bs-darkmode-toggle".
<div data-plugin="bs-darkmode-toggle"></div>Initialize with JS
Simply select the element and invoke the Boostrap Darkmode Toggle API.
<div id="bs-darkmode-toggle"></div>
<script>
document.getElementById('bs-darkmode-toggle').bsDarkmodeToggle();
</script>Collaborators welcome!
- :sos: Do you need some help? Open a thread in GitHub Discussions Q&A
- :bug: Do you find a bug? Open an issue in GitHub bug report
- :bulb: Do you have a great idea? Open an issue in GitHub feature request
- :computer: Do you know how to fix a bug? Open a pull request in GitHub pull request.
¿Do you like the project? Give us a :star: in GitHub.
