Single Element CSS3 Only Checkbox On/Off Replacement Toggle

Everyone has beef with checkboxes but in modern browsers it’s super easy to use the click event on the label and hide the actual checkbox. I’ve used a single element with :before and :after pseudo elements to render an on/off toggle switch which provides much better clarity and consistency across browsers.

Leave a Reply