Modern CSS Switch Component from Andy Bell

Andy’s following through on his promise to revive Piccalilli this year, publishing a great and thorough tutorial on making a switch component with modern CSS techniques, including :has and container queries. You really should subscribe to his blog if you are in the frontend space.

A highly configurable switch component using modern CSS techniques

Other posts you may enjoy!