v1.2.0

Switch

Switches toggle the state of a single setting on or off.

Basic

<me-switch></me-switch> <me-switch checked></me-switch>

Colors

Disabled

With Label

<label style="display:flex;align-items:center;gap:8px"> Airplane mode <me-switch></me-switch> </label>

API

AttributeTypeDefaultDescription
checkedbooleanfalseWhether the switch is on.
disabledbooleanfalseDisables the switch.
colorprimary | secondary | error | warning | info | successprimaryThe color palette to use.
valuestringonThe value submitted with the form.
namestringForm field name.

Events

EventDescription
changeFired when the switch state changes.