I need a good light-weight UI component to replace a checkbox. A switch, popularized by iOS, was a logical choice. By using the hidden checkbox, the switch uses only HTML and CSS and animates the state change smoothly.

Pen WxEpjJ by Vic Hsieh (@anubisvic) on CodePen.light