DEV Community

0 seconds of 0 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
00:00
 
Noman Gul
Noman Gul

Posted on

17 4

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. 👏🏾

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay