Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bootstrap-auto-dark-mode

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-auto-dark-mode

Adds the missing auto dark mode to Bootstrap >= 5.3, which switches automatically, based on system settings.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

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.

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>
            <!-- you code -->
            <script src="./src/bootstrap-auto-dark-mode.js"></script>
        </head>
        <!-- your code -->

Keywords

FAQs

Package last updated on 18 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc