Skip to content

Switch

<vox-switch> is a toggle for on/off settings, announced as a switch to assistive technology.

Enable dark modeSend anonymous usage stats
html
<vox-switch name="dark" checked>Enable dark mode</vox-switch>

API

AttributeTypeDefaultDescription
checkedbooleanfalseOn/off state
namestringForm field name
valuestringonSubmitted value when on
disabledbooleanfalseDisable the switch

Released under the Apache-2.0 License.