State machines for a toggle? You bet! David Khourshid & Stephen Shaw recreate this perfect example of a state machine powered animation using CSS & JavaScript.
- 💡 Inspiration: https://dribbble.com/shots/9841408-Loading-switch-interaction
- 📺 Video: https://youtu.be/0Wx9QbRQYuI
- 💻 Code: https://codepen.io/team/keyframers/pen/QWweedX
Additional Resources:
- Indeterminante Checkboxes https://css-tricks.com/indeterminate-checkboxes/
Like what we're doing? There are many ways you can support @keyframers so we can keep live coding awesome animations!
- Like & subscribe on YouTube at https://youtube.com/keyframers
- Buy web dev shirts, stickers & more at https://keyframe.rs/merch
- Follow & tweet us at https://twitter.com/keyframers.
- Support us on Patreon at https://patreon.com/keyframers
Topics covered:
- State Machines
- CSS Animation
- Data Attributes
A Pen by Matt Daniel Brown on CodePen.