About this set
Switches with some personality, for games, onboarding flows, kids products and marketing pages. The stretching knob widens while you press and hold, then springs across with an overshooting easing curve, and the amber track shows the on state. The mood switch has a face on its knob that spins a full turn and changes from a frown to a smile as the track turns red. The padlock is a 56 pixel tile showing an open lock that becomes a closed lock on a dark tile when switched on. Use them sparingly, where a moment of fun suits the product, and keep the classic set for ordinary settings. Each one is a visually hidden checkbox followed by an element; the stretch uses the :active state of the label, and the faces and locks are CSS generated content swapped by :checked. The Bootstrap version uses a .btn-check and .btn tile for the padlock, and the Tailwind version uses group-active and peer-checked variants.
What’s included
- Knob that stretches on press and springs across
- Mood face that spins and changes from frown to smile
- Padlock tile that closes when switched on
- Tracks darkened so the off and on states reach 3:1
- All motion removed under prefers-reduced-motion
Accessibility
Every control has an aria-label, and the stretch and mood controls use role="switch". The glyphs are decorative and hidden from assistive technology. Tab and Space work as for any checkbox, with a 2px blue focus outline around the visible control. The stretch, spin and colour transitions are all removed when prefers-reduced-motion is set.
Customise it
Change the track colours #7c8aa0, #d97706 and #ef4444 in .sq and .fc, and the tile colours in .lk (plain CSS and Bootstrap), or the --color-play-* theme colours and --ease-springy (Tailwind). The spring comes from the cubic-bezier timing function on the knob.






