vue3-star-ratings

# v-model

The Vue3StarRatings component uses the v-model directive to synchronize the rating between the component and its parent. This means that when you click on the stars to rate something, the rating will be reflected in the parent component.

Composition API

Options

# Props

You can customize the component by taking a look at the props table below.

Version 1.x.x/2.x.x

Version 3.x.x

NameDescriptionTypeDefault
starSizeThis is the height and width of the stars in pixelsNumber32
starColorThis is the color of the stars when activeString#ff9800
inactiveColorThis is the color of the stars when inactiveString#333
numberOfStarsSpecifies the total number of stars displayed and the maximum ratingNumber5
disableClickThis is the option to disable click on the stars, use in conjunction with the showControl PropBooleanfalse
v-modelSyncs the rating value between the component and its parent componentN/AN/A
customSvgProvides an option for using a custom SVG icon for the star ratingComponentN/A