DEV Community

Play Button Pause Button
Noman Gul
Noman Gul

Posted on

Create Toggle Switch in 4 Minutes by Using HTML/CSS/JavaScript

Live Demo HERE!

Source Code

Top comments (7)

Collapse
 
joeattardi profile image
Joe Attardi

This looks nice, but as it doesn’t use a checkbox input as the underlying control, I would think this would have accessibility issues.

Collapse
 
nomangul profile image
Noman Gul

Oh... Joe, maybe your Right. BTW I'm just advancing in my skills and want to learn more and more from seniors :)

Thanks for increasing my knowledge <3

Collapse
 
joeattardi profile image
Joe Attardi
Thread Thread
 
link2twenty profile image
Andrew Bone

Thanks for the mention 🙂

Collapse
 
joeattardi profile image
Joe Attardi

I hope that didn't come across as rude, I didn't mean it to be. It is definitely a cool looking toggle switch. Keep at it!

I only mentioned accessibility because it's something people don't always think about, but is really important.

Thread Thread
 
nomangul profile image
Noman Gul

My next learning target is Accessibility.

Thanks, Joe

Thread Thread
 
okbrown profile image
Orlando Brown

I'm so glad your receptive enough to recognise this. Don't forget to update your post to reflect this. So that others can learn like you have. 👏🏾