A highly configurable switch component using modern CSS techniques - Piccalilli
Briefly

Still, this collection of demos is worth enjoying. Here's a video for those who don't have the latest version of Safari Technology Preview.
The HTML for this is pretty straightforward: The first thing to note is the root of this component is a <label> element. I like that pattern for checkbox and radio buttons because you get a nice increased tap area.
Read at Piccalilli
[
|
]