Switch—HTML+CSS

I’m working on a Chrome/Safari extension that needs a few on/off switches for a configuration popover. I wanted the switches to use regular HTML checkbox inputs and no JavaScript. I’ve built a few switch-type things for clients before, but I wanted a component I could reuse and improve.

This was a hasty afternoon project so the code’s a bit nasty, but I chucked it up on Github if anyone wants to take it for a spin.

Whammy: http://meyer-archives.github.io/css-toggle-switch/

More by Mike Meyer

View profile