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
| Attribute | Type | Default | Description |
checked | boolean | false | Whether the switch is on. |
disabled | boolean | false | Disables the switch. |
color | primary | secondary | error | warning | info | success | primary | The color palette to use. |
value | string | on | The value submitted with the form. |
name | string | — | Form field name. |
Events
| Event | Description |
change | Fired when the switch state changes. |