Bootstrap iOS Switch

Bootstrap iOS switch example

by shrinitech

HTML

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
<div class="container">
  <div class="switch-demo">
    <div class="custom-control custom-switch">
      <input type="checkbox" class="custom-control-input" id="customSwitch1">
      <label class="custom-control-label" for="customSwitch1">Toggle this switch element</label>
    </div>
    <div class="custom-control custom-switch">
      <input type="checkbox" class="custom-control-input" disabled id="customSwitch2">
      <label class="custom-control-label" for="customSwitch2">Disabled switch element</label>
    </div>
  </div>

</div>

CSS

body {
  background-color: #f1f1f1;
}

.switch-demo {
  margin-top: 60px;
  text-align: center;
}