DEV Community

Cover image for inputs type=switch
Rémy F.
Rémy F.

Posted on • Edited on

inputs type=switch

If you are looking for a Javascript+Jquery+JqueryUI+Grunt way to create a switch: https://naeka.github.io/jquery-switchbutton/

If you're not : you're in the right place.

What's the trick doc ?

We're simply going to disable the <input> appearance, then use a radial-background to display a white toggle on green-or-grey background.

Can I haz animation ?

I don't know, can you animate a radial background ?

(no)

Top comments (1)

Collapse
 
tleperou profile image
Thomas Lepérou

Pure CSS way. Great one :thumbs_up: