vb-switch
v1.0.8
Published
Switch component for Vue Bulma
Downloads
8
Maintainers
Readme
Switch
Switch component for Vue Bulma.
Installation
$ npm install vb-switch --save
Examples
<template>
<div>
<p>
<vb-switch type="success" size="large" checked v-model="value"></vb-switch>
</p>
<p>
{{ text }}
</p>
</div>
</template>
<script>
// do not use below code, because `Switch` is svg tag.
// import Switch from 'vue-bulma-switch'
import VbSwitch from 'vue-bulma-switch'
export default {
components: {
VbSwitch
},
data () {
return {
value: false,
text: ''
}
},
watch: {
value (val) {
this.text = val ? 'Right' : 'Wrong'
}
}
}
</script>
Badges