User-friendly Dark Mode Plugin For Bootstrap 5 – darkMode.js

Category: Javascript | February 3, 2023
Author:JuanmaElegido
Views Total:222 views
Official Page:Go to website
Last Update:February 3, 2023
License:MIT

Preview:

User-friendly Dark Mode Plugin For Bootstrap 5 – darkMode.js

Description:

darkMode.js is a lightweight and easy-to-use JavaScript plugin that adds a user-friendly dark mode option to your Bootstrap project.

This plugin is fully compatible with the latest Bootstrap 5 framework and allows the user to regulate the shade between black, nine grays, and white.

How to use it:

1. Add the darkMode.js to your Bootstrap 5 project.

<!-- Required -->
<link rel="stylesheet" href="/path/to/cdn/bootstrap.min.css" />
<script src="/path/to/cdn/bootstrap.bundle.min.js"></script>
<!-- darkMode.js -->
<script src="/path/to/js/darkMode.js"></script>

2. Create an empty DIV to hold the dark mode toggle. That’s it.

<div id="darkModeDom"></div>

You Might Be Interested In:


Leave a Reply