Switch
To use the switch component, first import it:
import {Switch} from 'src/components'
Global usage
Vue.component(Switch.name, Switch)
For local usage
export default {
components: {
[Switch.name]: Switch
}
}
Simple switch
With text
ON
OFF
ON
OFF
Slots
Disabled switch
ON
OFF
Switch Props
Events
Event Name | Description | Parameters |
---|---|---|
input | triggers when the binding value changes | the updated value |
Slots
Name | Description |
---|---|
on | Content to be displayed on switch when switch is on |
off | Content to be displayed on switch when switch is off |