Rating: {{ rating }}
``` ### Different Sizes Rate supports `small`, `medium`, `large` sizes, or custom numeric sizes. ```vueRating: {{ rating }}
``` ### Readonly Mode Display rating without user interaction. ```vueRating: {{ rating }}
``` ### Custom Count Set a custom maximum rating value. ```vueRating: {{ rating }} / 10
``` ## API Reference ### n-rate Props | Name | Type | Default | Description | |------|------|---------|-------------| | `allow-half` | `boolean` | `false` | Allow activating half of the icon | | `clearable` | `boolean` | `false` | Whether the rate is clearable. Clicking on current value resets to `null` | | `color` | `string` | `undefined` | Activated icon color. Supports `#FFF`, `#FFFFFF`, `yellow`, `rgb(0, 0, 0)` formats | | `count` | `number` | `5` | Number of icons (maximum rating) | | `default-value` | `number \| null` | `null` | Default value of activated icons | | `readonly` | `boolean` | `false` | Readonly state | | `size` | `'small' \| 'medium' \| 'large' \| number` | `'medium'` | Icon size | | `value` | `number \| null` | `undefined` | Value of activated icons (controlled mode) | ### Events | Name | Parameters | Description | |------|------------|-------------| | `on-clear` | `() => void` | Callback when value is cleared | | `on-update:value` | `(value: number) => void` | Callback when the value (rating) changes | ### Slots | Name | Parameters | Description | |------|------------|-------------| | `default` | `(info: { index: number })` | Custom icon for the rating. `index` is the position (0-based) | ## Common Patterns ### Rate in Form ```vueSelected: {{ getEmojiLabel(emojiRating) }}
``` ### Rating with Feedback ```vue