Vue Material -

Switch


by Creative Tim
Docs
Components
Premium themes

On/off switches toggle the state of a single settings option. The option that the switch controls, as well as the state it’s in, should be made clear from the corresponding inline label. Vue material switches can work with multiple v-model types: String, Number, Boolean and Array.

Switch

Switch
Array Boolean String No Value
[] false
Hue Colors

API - md-switch

The following options can be applied to all switches:

NameDescriptionDefault
value String|Number|Boolean The value of the switch on
v-model String|Number|Boolean|Array The model variable to bind the selection value. If array, it will toggle values inside of it. If no value is assigned, then it will use the same behaviour of a regular input[type="checkbox"]. null
id String The switch unique id. a random string
All other <input type="checkbox"> attributes, such as name and required, can be used on md-switch.