Toggle Switch Collection Using Pure CSS With Custom Properties

Worried about licensing?

Do you have right license for your templates and fonts?

Head over to our partner Envato Elements and unlock unlimited downloads of over 50 million digital assets with full commercial licensing.

  • 50+ Million Assets with Unlimited Downloads
  • Templates, Addons, Fonts, Footage, Photos, Brushes, Presets & More
  • Full Commercial licensing for client work

Get ultimate peace of mind!

Get Started Now
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.