vue-bulma-switch

2.0.0-alpha.6 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i vue-bulma-switch

      Weekly Downloads

      140

      Version

      2.0.0-alpha.6

      License

      MIT

      Unpacked Size

      6.77 kB

      Total Files

      4

      Last publish

      Collaborators

      • fundon
      • luventa