Skip to content

vue-bulma/slider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slider

Slider component for Vue Bulma.

Installation

$ npm install vue-bulma-slider --save

Examples

<template>
  <div>
    <slider type="success" size="large" :value="value" :max="100" :step="1" is-fullwidth @change="update"></slider>
    <input class="input" type="number" v-model="value" min="0" max="100" number>
  </div>
</template>

<script>
import Slider from 'vue-bulma-slider'

export default {
  components: {
    Slider
  },

  data () {
    return {
      value: 23
    }
  },

  computed: {
    per () {
      return this.value + '%'
    }
  },

  methods: {
    update (val) {
      this.value = Number(val)
    }
  }

 }
</script>

Badges


fundon.me  ·  GitHub @fundon  ·  Twitter @_fundon