Bootstrap Darkmode Toggle is a plugin for bootstrap to add a light/dark mode switch in to your app.
| Version | Bootstrap Support | Last Release |
|---|---|---|
| v1 |
See EOL for each version in Security Policy Page.
Please read our documentation page for a completed usage explanation: https://palcarazm.github.io/bs-darkmode-toggle/
<!-- Consider loading Bootstrap and Bootstrap 5 toggle dependencies -->
<script src="https://cdn.jsdelivr.net/npm/bs-darkmode-toggle@1.0.0/js/bs-darkmode-toggle.ecmas.min.js"></script><!-- Consider loading Bootstrap, jQuery and Bootstrap 5 toggle dependencies -->
<script src="https://cdn.jsdelivr.net/npm/bs-darkmode-toggle@1.0.0/js/bs-darkmode-toggle.jquery.min.js"></script>npm install bs-darkmode-toggle@1.0.0yarn add bs-darkmode-toggle@1.0.0Simply create a div with the data attribute data-plugin="bs-darkmode-toggle".
<div data-plugin="bs-darkmode-toggle"></div>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>- 🆘 Do you need some help? Open a thread in GitHub Discussions Q&A
- 🐛 Do you find a bug? Open an issue in GitHub bug report
- 💡 Do you have a great idea? Open an issue in GitHub feature request
- 💻 Do you know how to fix a bug? Open a pull request in GitHub pull request.
¿Do you like the project? Give us a ⭐ in GitHub.