Toggle Switch Collection Using Pure CSS With Custom Properties

Image: Toggle Switch Collection Using Pure CSS With Custom Properties GIF

Here are some CSS only toggle buttons that were designed by Stas Melnikov. There are a few styles to choose from circular or square toggles and with different colours in on and off state.

If you are having trouble with the pen, try the archived copy on GitHub

Toggle Switch Snippet

See the Pen Pure CSS Switches with Custom Properties by Stas Melnikov (@melnik909) on CodePen.0

Posted by:Saijo George

Digital Marketer with a strong focus on technical SEO and design. One of the top 100 makers on Producthunt, co-organizer of the SEO Meetup in Melbourne, an instructor at General Assembly. Worked with brands like Envato, AEON. Currently the SEO Strategy Director at Supple.