Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
vue-js-star-rating
Advanced tools
It's easy to use Vue.js component for star rating!
npm i vue-js-star-rating --save
yarn add vue-js-star-rating --save
After import and registering component in your Vue.js application:
<template>
<div>
<vue-star-rate
:rateRange="3"
:maxIcon="5"
:iconHeight="22"
:iconWidth="22"
:hasCounter="true"
iconColor="#FFFF99"
iconColorHover="#FFFF99"
iconShape="star"
></vue-star-rate>
</div>
</template>
<script>
import vueStarRate from "vue-js-star-rating";
export default {
components: { vueStarRate }
};
</script>
Attribute | Description | Type | Default |
---|---|---|---|
rateRange | Number of active icon | Number | 3 |
maxIcon | Number of icons | Number | 5 |
iconHeight | Icon height | Number | 45 |
iconWidth | Icon width | Number | 45 |
hasCounter | Counter like 3 of 5 | Boolean | true |
iconColor | Color of icon | String | #f3d23e |
iconColorHover | Color of hover icon | String | #f3d23e |
iconShape | Shape of icon like star, heart, etc | String | star |
ratingSet | Event after click on icon | Event | null |
When a star is clicked, an event is emitted called ratingSet
. You can listen for
this event to get the value of the rating.
<template>
<div>
<vue-star-rate v-on:ratingSet="myRatingMethod"></vue-star-rate>
</div>
</template>
<script>
import vueStarRate from "vue-js-star-rating";
export default {
components: { vueStarRate },
methods: {
myRatingMethod(rating) {
console.log("The selected rating is " + rating);
}
}
};
</script>
FAQs
Vue fontawesome icons rating
The npm package vue-js-star-rating receives a total of 60 weekly downloads. As such, vue-js-star-rating popularity was classified as not popular.
We found that vue-js-star-rating demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.