bootstrap-auto-dark-mode

1.1.1 • Public • Published

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

Usage

Use it by just including bootstrap-auto-dark-mode.js in your header and setting data-bs-theme to auto.

    <html lang="en" data-bs-theme="auto">
        <head>
            <!-- your code -->
            <script src="./src/bootstrap-auto-dark-mode.js"></script>
        </head>
        <!-- your code -->
        <!-- […] -->

Find more high quality modules from shaack.com on our projects page.

Readme

Keywords

Package Sidebar

Install

npm i bootstrap-auto-dark-mode

Weekly Downloads

18

Version

1.1.1

License

MIT

Unpacked Size

5.19 kB

Total Files

6

Last publish

Collaborators

  • shaack