Patterns

Reusable techniques that you can apply to your projects that solve common problems and challenges.

CSS only iOS style ‘toggle’
CSSPatterns

CSS only iOS style ‘toggle’

Since they appeared in iOS it’s been a trend to recreate these using CSS only. The technique uses the adjacent sibling selector and a hidden checkbox to retain use of the :checked pseudo class. In this post I wanted to take a look at this myself and recreate the toggle style.