StarRating
Star rating component for collecting user ratings with customizable count, color, and size.
Basic Usage
vue
<TStarRating v-model="rating" />Custom Count & Size
vue
<TStarRating v-model="rating" :count="8" :size="32" />Read-only
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
model-value | number | 0 | Current rating value |
count | number | 5 | Total star count |
size | number | 24 | Star size (px) |
color | string | — | Star color |
readonly | boolean | false | Disable interaction |
half | boolean | false | Allow half-star ratings |
Emits
| Event | Parameters | Description |
|---|---|---|
update:model-value | value: number | Rating changed |
change | value: number | Rating confirmed |