Dynamic Vue Star Rating Component

Description:

A dynamic star rating Vue component inspired by Google Play.

How to use it:

1. Import and register the star rating component.

import StarRating from 'vue-dynamic-star-rating'
Vue.component('star-rating', StarRating);
// OR
components: {
  StarRating
}

2. Add the star rating component to the app.

<stars-rating v-bind="config"></stars-rating>
export default {
  name: "App",
  components: {
    starsRating: starsRating
  },
  data() {
    return {
      config: {
        rating: 4.7,
        isIndicatorActive: true,
        starStyle: {
          fullStarColor: "#ed8a19",
          emptyStarColor: "#737373",
          starWidth: 100,
          starHeight: 100
        }
      }
    };
  },
  computed: {},
  methods: {},
  created() {}
};

Preview:

Dynamic Vue Star Rating Component

Download Details:

Author: JonathanDn

Live Demo: https://codesandbox.io/s/morqm41968

Download Link: https://github.com/JonathanDn/vue-stars-rating/archive/master.zip

Official Website: https://github.com/JonathanDn/vue-stars-rating

Install & Download:

# NPM
$ npm i vue-dynamic-star-rating

You Might Be Interested In:

Tags:

Add Comment