Refer to PrimeVue setup documentation for download and installation steps for your environment such as Vue CLI, Vite or browser.
import Rating from 'primevue/rating';
Two-way value binding is defined using v-model.
<Rating v-model="val" />
Number of stars to display is defined with stars property, default is 5.
<Rating v-model="val" :stars="7"/>
A cancel icon is displayed to reset the value by default, set cancel as false to remove this option.
<Rating v-model="val" :cancel="false" />
Rating supports various themes featuring Material, Bootstrap, Fluent as well as your own custom themes via the Designer tool.
Visit the PrimeVue Rating showcase for demos and documentation.