DEV Community

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

Posted on • Edited on

1 1

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:

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay