Skip to content

OliverGrimsley/vue2-star-rating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

vue2-star-rating

A simple Vue 2 component for star ratings that does not rely on any plugins or dependent js.

This vue component is based on https://github.com/Jamiek94/Vuejs-rating

How to Use: import into your javascript:

import showRatings from './components/showRatings.vue';
...
Vue.component('show-ratings',showRatings);
...
var vm = new Vue({
  el: '#employee',
	components: {
    ...,
    showRatings
  }
});

Reference the component wherever you need a rating based on stars:

<div id="employee">
  <show-ratings max="10" v-model="question.value"></show-ratings>
</div>

Props:

Property option
max number of stars to show and range of values
disabled (true or false) Disables rating for that item e.g. <show-ratings max="10" disabled="true" v-model="question.value"></show-ratings>

About

Vue 2 component for star ratings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages