vue-bulma-switch
Version:
Switch component for Vue Bulma
65 lines (47 loc) • 975 B
Markdown
# Switch
Switch component for Vue Bulma.
## Installation
```
$ npm install vue-bulma-switch --save
```
## Examples
```vue
<template>
<div>
<p>
<vb-switch type="success" size="large" v-model="value" @change="change"/>
</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: ''
}
},
methods: {
change (val) {
this.text = val ? 'Right' : 'Wrong'
}
}
}
</script>
```
## Badges


---
> [fundon.me](https://fundon.me) ·
> GitHub [@fundon](https://github.com/fundon) ·
> Twitter [@_fundon](https://twitter.com/_fundon)