Requirements
To use this project, you need the following:
Install Bootstrap 5.2 or later 1
The theme toggler relies on Bootstrap 5.2 or a newer version to function correctly. Ensure you have Bootstrap included in your project.
bash
npm i bootstrap
JavaScript
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.bundle.min';
or
HTML
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
Install Bootstrap icons (optional) 2
For enhanced visual appeal, you can optionally include Bootstrap Icons in your project. These icons can be used to visually indicate the current theme (light or dark) and add a polished touch to your UI.
bash
npm i bootstrap-icons
JavaScript
import 'bootstrap-icons/font/bootstrap-icons.css';
or
HTML
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.min.css" rel="stylesheet">