All Projects → coliff → Dark Mode Switch

coliff / Dark Mode Switch

Licence: mit
Add a dark-mode theme toggle with a Bootstrap Custom Switch

Projects that are alternatives of or similar to Dark Mode Switch

Ngx Responsive
Superset of RESPONSIVE DIRECTIVES to show or hide items according to the size of the device screen and another features in Angular 9
Stars: ✭ 300 (-9.64%)
Mutual labels:  bootstrap
Carbon
Elegant Bootstrap 4 Admin Template
Stars: ✭ 309 (-6.93%)
Mutual labels:  bootstrap
Roncoo Adminlte
RonCoo AdminLTE --是一个完全响应式的免费开源后台管理模板。基于 AdminLTE 框架(后续会随着版本更新而更新);使用jQuery 2.2.3版本,并引入很多优秀的第三方jQuery插件,开发者也可以改用自己熟悉的第三方插件,易于使用,并高度可定制,适合许多屏幕分辨率从小型移动设备到大型台式机,这是国内的开源模板未支持的。
Stars: ✭ 320 (-3.61%)
Mutual labels:  bootstrap
Laravel Form Components
A set of Blade components to rapidly build forms with Tailwind CSS (v1.0 and v2.0) and Bootstrap 4. Supports validation, model binding, default values, translations, Laravel Livewire, includes default vendor styling and fully customizable!
Stars: ✭ 295 (-11.14%)
Mutual labels:  bootstrap
Mix.core
🚀 Mixcore CMS is an open source CMS that support both headless and decoupled to easily build any kinds of app/web app/customisable APIs built on top of ASP.NET Core / Dotnet Core. It is a completely open source ASP.NET Core (Dotnet Core) CMS solution. https://mixcore.org
Stars: ✭ 304 (-8.43%)
Mutual labels:  bootstrap
Coreui Free React Admin Template
CoreUI React is a free React admin template based on Bootstrap 5
Stars: ✭ 3,573 (+976.2%)
Mutual labels:  bootstrap
Pandora
A Manageable, Measurable and Traceable Node.js Application Manager represented by Alibaba powered by TypeScript
Stars: ✭ 3,084 (+828.92%)
Mutual labels:  bootstrap
Wondercms
WonderCMS - fast and small flat file CMS (5 files)
Stars: ✭ 330 (-0.6%)
Mutual labels:  bootstrap
Select2 Bootstrap4 Theme
Select2 v4 theme for Bootstrap4
Stars: ✭ 305 (-8.13%)
Mutual labels:  bootstrap
Uix Kit
A free UI toolkit based on some common libraries for building beautiful responsive website, compatible with Bootstrap v4.
Stars: ✭ 318 (-4.22%)
Mutual labels:  bootstrap
Material
Material Design for Bootstrap 4
Stars: ✭ 3,169 (+854.52%)
Mutual labels:  bootstrap
Bstreeview
Bootstrap Treeview, A very simple plugin to build a basic and elegant Treeview with bootstrap 4. See the demo:
Stars: ✭ 308 (-7.23%)
Mutual labels:  bootstrap
Wp Bootstrap Navwalker
A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.
Stars: ✭ 3,290 (+890.96%)
Mutual labels:  bootstrap
Rpi23 Gen Image
Advanced Debian "stretch" and "buster" bootstrap script for RPi 0/1/2/3 and QEMU
Stars: ✭ 300 (-9.64%)
Mutual labels:  bootstrap
Coreui Vue
Over 90 Bootstrap based Vue.js components and directives. CoreUI React.js UI Components. CoreUI for Vue.js replaces and extends the Bootstrap javascript. Components have been built from scratch as true Vue components, without jQuery and unneeded dependencies.
Stars: ✭ 318 (-4.22%)
Mutual labels:  bootstrap
Light Bootstrap Dashboard Angular2
Light Bootstrap Dashboard Angular 2
Stars: ✭ 299 (-9.94%)
Mutual labels:  bootstrap
Angularjs Springmvc Sample Boot
A RESTful sample using Spring Boot, Spring MVC, Spring Data and Angular/Bootstrap.
Stars: ✭ 309 (-6.93%)
Mutual labels:  bootstrap
Minimal
Personal blog theme powered by Hugo
Stars: ✭ 330 (-0.6%)
Mutual labels:  bootstrap
Jetstrap
A Laravel 8 package to easily switch TailwindCSS resources generated by Laravel Jetstream and Breeze to Bootstrap 4.
Stars: ✭ 320 (-3.61%)
Mutual labels:  bootstrap
Bootstrap Rating Input
Another plugin that eases the generation of rating stars for jQuery and Bootstrap
Stars: ✭ 318 (-4.22%)
Mutual labels:  bootstrap

LICENSE GitHub Super-Linter code style: prettier Best of JS GitHub Stars NPM Downloads

🌓 Dark Mode Switch

Add a dark-mode theme toggle with a Bootstrap Custom Switch.

  • Uses local storage to save preference
  • Only 262 Bytes minified and gzipped!

Quick start

Several quick start options are available:

  • Download the latest release
  • Clone the repo git clone https://github.com/coliff/dark-mode-switch.git
  • Install with npm npm install dark-mode-switch
  • Install with yarn yarn add dark-mode-switch

Usage

  1. Add your custom switch for the Dark Mode toggle followed by the dark-mode-switch.min.js script:
<div class="custom-control custom-switch">
  <input type="checkbox" class="custom-control-input" id="darkSwitch" />
  <label class="custom-control-label" for="darkSwitch">Dark Mode</label>
</div>
<script src="dark-mode-switch.min.js"></script>
  1. Edit the dark-mode.css to suit your site - the one included here is a very basic example.

How it works

Turning dark mode on will add data-theme="dark" to the body tag. You can use CSS to target the elements on the page like so:

[data-theme="dark"] {
  background-color: #111 !important;
  color: #eee;
}

Demo

Demo page

Browser Support

Works well with all the browsers supported by Bootstrap

To Enable DarkMode in Android Webview

WebSettings.setDomStorageEnabled(true)

Credits

Created thanks to the excellent dark-theme and local storage tutorials over at codyhouse.co.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].