vb-rating

1.0.3 • Public • Published

Rating

Rating component is based on starability.css for Vue Bulma.

Installation

$ npm install vb-rating --save

Examples

<template>
  <form>
    <rating :items="items" legend="Default star rating:" :value="value" @change="update"></rating>
  </form>
  {{ value }}
</template>
 
<script>
import Rating from 'vue-bulma-rating'
 
export default {
  components: {
    Rating
  },
 
  data () {
    return {
      value: 2,
      items: [
        {
          title: '5 Stars',
          value: 5
        },
        {
          title: '4 Stars',
          value: 4
        },
        {
          title: '3 Stars',
          value: 3
        },
        {
          title: '2 Stars',
          value: 2
        },
        {
          title: '1 Star',
          value: 1
        }
      ]
    }
  },
 
  methods: {
    update (val) {
      this.value = val
    }
  }
}
</script>
 

Badges


fundon.me  ·  GitHub @fundon  ·  Twitter @_fundon

/vb-rating/

    Package Sidebar

    Install

    npm i vb-rating

    Weekly Downloads

    3

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • suyanlu