vue-bulma-switch

Switch component for Vue Bulma
12,562 21
Install
npm install vue-bulma-switch@1.0.5
Latest Version:1.0.5
Vue:2
Older releases:1
License:MIT
Last Updated:Oct 14, 2018
Links: GitHub  ·  npm
Maintainer: fundon

Switch

Switch component for Vue Bulma.

Installation

$ npm install vue-bulma-switch --save

Examples

<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  ·  GitHub @fundon  ·  Twitter @_fundon

Related Packages

Version History

Version Released Vue License
1.0.5 >=2 MIT
1.0.4 >=2 MIT
1.0.3 >=2 MIT
1.0.2 >=2 MIT
1.0.1 >=2 MIT
Pre-releases (7)
Version Released Vue License
2.0.0-alpha.6 >=2 MIT
2.0.0-alpha.5 >=2 MIT
2.0.0-alpha.4 >=2 MIT
2.0.0-alpha.3 >=2 MIT
2.0.0-alpha.2 >=2 MIT