Skip to content

Rating

te-rating is a star rating with optional half values.

Basic

vue
<te-rating v-model="score" />
<te-rating v-model="score" :quantity="10" />

Half values, clearable and disabled

vue
<te-rating v-model="score" clearable />
<te-rating :model-value="3.5" disabled />

Custom icon and colour

vue
<te-rating v-model="score" icon="heart-fill" color="crimson" />

Props

PropTypeDefaultDescription
modelValuenumber0Supports v-model. Halves are allowed.
quantitynumber5How many icons.
iconstring'star-fill'Icon name, from your icon font.
iconSizeClassstring'text-xl'Classes controlling the icon size.
spacingnumber (0–5)1Gap between icons.
colorstring'gold'Any CSS colour for the filled state.
hasHalfValuesbooleantrueEnables half selections.
clearablebooleanfalseAdds an eraser that resets to 0.
disabledbooleanfalseMakes it read-only.

Events

EventPayloadDescription
update:modelValuenumberA value was picked.

Released under the MIT License.