Share your repls and programming experiences

← Back to all posts
Toggle switch buttons
rjlevy (315)
  • various toggle switch buttons made purely with CSS
  • each button's size, colour and shape are defined with custom vars
  • for example, this button has a height of 150px, a colour of dodgerblue and a round shape:
<label class="btn-toggler" style="--height:150px;--colour:dodgerblue;">
  <input type="checkbox" checked>
  <span class="slider round"></span>