title: How to make toggle button responsive?
body: <p>I don't know how to make the bootstrap style responsive with my input. </p>
  
  <p>Because every time I've tried to implement it, it's rendering a basic ugly checkbox. And I loose my style.</p>
  
  <p>I have a field <code>:secret(boolean)</code>, and I would like to make a toggle button with that.</p>
  
  <p>That's my code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>/*** TOGGLE DEFAULT ***/
  
  .TriSea-technologies-Switch&gt;input[type="checkbox"] {
    display: none;
  }
  
  .TriSea-technologies-Switch&gt;label {
    cursor: pointer;
    height: 0px;
    position: relative;
    width: 40px;
  }
  
  .TriSea-technologies-Switch&gt;label::before {
    background: rgb(0, 0, 0);
    box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    content: '';
    height: 16px;
    margin-top: -8px;
    margin-left: -20px;
    position: absolute;
    opacity: 0.3;
    transition: all 0.4s ease-in-out;
    width: 40px;
  }
  
  .TriSea-technologies-Switch&gt;label::after {
    background: rgb(255, 255, 255);
    border-radius: 16px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
    content: '';
    height: 24px;
    left: -4px;
    margin-top: -8px;
    position: absolute;
    top: -4px;
    transition: all 0.3s ease-in-out;
    width: 24px;
  }
  
  .TriSea-technologies-Switch&gt;input[type="checkbox"]:checked+label::before {
    background: inherit;
    opacity: 0.5;
  }
  
  .TriSea-technologies-Switch&gt;input[type="checkbox"]:checked+label::after {
    background: inherit;
    left: 20px;
  }
  
  
  /*** TOGGLE DEFAULT ***/</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"&gt;
  &lt;div class="form-inputs"&gt;
    &lt;h4&gt;
      Nom du groupe :
    &lt;/h4&gt;
    &lt;%= f.input :name, label: false %&gt;
      &lt;br&gt;
      &lt;h4 style="width: 330px; text-align:center; margin-left:30px;"&gt;
        &lt;div class="pull-left"&gt;
          Groupe secret
        &lt;/div&gt;
        &lt;div class="TriSea-technologies-Switch pull-right" style="margin-right:20px;"&gt;
          &lt;input id="TriSeaSuccess" name="TriSea1" type="checkbox" /&gt;
          &lt;label for="TriSeaSuccess" class="label-success"&gt;&lt;/label&gt;
        &lt;/div&gt;
      &lt;/h4&gt;
      &lt;%= f.hidden_field :admin, :value =&gt; current_user.id  %&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Should I use a gem for that? Or I can make it directly with a secret do or a JavaScript function?</p>