https://github.com/shaack/bootstrap-auto-dark-mode
include this script to set the bootstrap 5.3 dark-mode automatically based on system settings
https://github.com/shaack/bootstrap-auto-dark-mode
Last synced: about 1 year ago
JSON representation
include this script to set the bootstrap 5.3 dark-mode automatically based on system settings
- Host: GitHub
- URL: https://github.com/shaack/bootstrap-auto-dark-mode
- Owner: shaack
- License: mit
- Created: 2023-06-08T14:44:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-04T09:45:32.000Z (over 2 years ago)
- Last Synced: 2024-11-09T09:53:56.417Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bootstrap-auto-dark-mode
This script adds the missing auto-dark mode to the new theme feature of Bootstrap 5.3.
It switches the Bootstrap theme automatically between light and dark mode, depending on the system settings, if you set the `data-bs-theme` attribute of your <html> to `auto`.
## References
- [Demo page](https://shaack.com/projekte/bootstrap-auto-dark-mode/)
- [GitHub repository](https://github.com/shaack/bootstrap-auto-dark-mode)
- [npm package](https://www.npmjs.com/package/bootstrap-auto-dark-mode)
## Usage
Use it by just including `bootstrap-auto-dark-mode.js` in your header and setting `data-bs-theme` to `auto`.
```html
```
---
Find more high quality modules from [shaack.com](https://shaack.com)
on [our projects page](https://shaack.com/works).