:star: A simple, highly customisable star rating component for Vue 2.x. / 3.x
Version 1.3.0 adds support for v-model
when using Vue 2.2 and above:
<star-rating v-model="boundRating"></star-rating>
import StarRating from 'vue-star-rating';
export default {
components:{
StarRating
},
data(){
return {
boundRating: 0
}
}
}
Thanks to @acro5piano for the input on this feature.
Default border color updated to #999
for better contrast when stars are unselected.
Version 1.2.0 adds the ability to add borders to stars via 2 new props:
It is now also possible to set the width between stars using the new padding
prop.
This version also fixes an issue where the stars would remain highlighted if the cursor continues to move on the same row.
'id' prop in Star.vue
has been updated to star-id
, this fixes an issue where multiple id's
with the same name are placed on the page. This is an internal change only.
In this minor release a new inline
prop has been added, which allows you to specify whether you want your star rating to display inline.
There aren't any breaking changes in this release, however, if you have been targeting id's
they have now been changed to classes to prevent multiple id's
with the same name appearing on the page:
#stars is now .star-rating #rating-text is now .rating-text
This release should now solve all the npm
issues and package should now work consistently with both webpack
and browserify
.
pre-transpiled
code, as this causes an error with the runtime-only
build which could lead to confusion.src/star-rating.vue
so these will now need to be compiled.webpack/vue-loader/babel-loader
and browserify/vueify/babelify
build configurations.This release fixes a few issues with the npm
package.
Docs update only
read-only
was true by default and that stars were read only when this prop was set to false.Update Readme: -Incorrect CDN url was previously given -Example of reactive prop added
Version now synced with npm version.