1.0.3 • Published 4 years ago

shapla-star-rating v1.0.3

Weekly downloads
39
License
MIT
Repository
github
Last release
4 years ago

shapla-star-rating

A simple, highly customisable star rating component for Vue

Table of contents

Installation

npm install --save shapla-star-rating

Usage

Add the component:

import StarRating from 'shapla-star-rating';

export default {
  name: 'Hello',

  components: {
    StarRating
  },
  data(){
    return {
      rating:4,
      staticRating:4.6,
    }    
  }
}
<star-rating v-model="rating"></star-rating>

<star-rating v-model="staticRating" :is-static="true"></star-rating>

Props

PropertyTypeRequiredDefaultDescription
valueNumberyes | The initial rating
is-staticBooleannofalseIf set true, the rating cannot be edited.
colorStringno | The color of the non-highlighted portion of a star.
active-colorStringno | The color of the highlighted portion of a star.
ratingsArrayno[1, 2, 3, 4, 5]List of rating value
1.0.3

4 years ago

1.0.2

5 years ago

1.0.0

5 years ago