A switch functions similar to a checkbox but explicitly represents on and off states. It has the advantage of not needing CSS or JavaScript to be fully functional and accessible. Loading CSS brings support for right-to-left languages, verticality, animation and more. The top-level class, .gui-switch contains custom properties used throughout the component children.

13m read timeFrom web.dev
Post cover image
Table of contents
Overview #Layouts #Styles #States #JavaScript #Conclusion #
1 Comment

Sort: