Skip to content
Rating component is based on starability.css for Vue Bulma
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore Rating Jul 15, 2016
LICENSE
README.md update to Vue 2.0 API Sep 21, 2016
package.json
yarn.lock pkg: update Feb 27, 2017

README.md

Rating

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

Installation

$ npm install vue-bulma-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

You can’t perform that action at this time.