# Input Rating

> Star rating input for capturing review scores and ratings.

## Playground

An interactive playground for InputRating is embedded above. Open the canonical story on Storybook: [https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputrating--default](https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputrating--default)

## Overview

`InputRating` is the star-rating input used inside `ReviewForm` and any rating-capture flow. Wrap it in `<LField>` to surface validation messages when the user submits without a rating.

For display-only ratings, reach for [`StarsRating`](/laioutr-ui/ui-kit/indicators/starsrating) (graphic only) or [`RatingSummary`](/laioutr-ui/ui-kit/indicators/ratingsummary) (graphic plus review count). For the per-star distribution bars in a review section, see [`RatingProgressBarFilter`](/laioutr-ui/ui-kit/general/rating-progress-bar-filter).

## Key Business & UX Benefits

- A familiar star pattern lets shoppers leave a rating in one tap, which drives the volume of UGC needed to lift product page conversion.
- Wrapping in `<LField>` surfaces the parent Field's `errorMessage` when a rating is missing, so customers see why the form failed instead of guessing.
- Reusing the same control inside `ReviewForm` and standalone rating flows keeps the visual signal consistent everywhere shoppers see ratings.

## Feature List

<features :items="["`maxRating` prop (default 5) sets the number of stars, so 5-, 10-, or N-star scales come from one component","`size` prop drives both star icon and label size, keeping the rating proportional to the surrounding form chrome","Numeric v-model from 0 to `maxRating`, so consumers store the score as a plain number","Localized helper text via `$tl('inputRating.label')` keeps the field's accessible label correct in every market","Wraps cleanly in `<LField>`, so 'rating required' errors surface inline rather than failing silently"]">



</features>

## API Reference

#### Props

```json
{"type":"object","properties":{"modelValue":{"type":"number","default":0},"maxRating":{"type":"number","default":5},"size":{"enum":["s","m","l","sm"],"type":"string","default":"m"},"color":{"enum":["primary","accent","yellow","black"],"type":"string","default":"yellow"},"disabled":{"type":"boolean","default":false},"required":{"type":"boolean","default":false},"invalid":{"type":"boolean","default":false},"id":{"type":"string","default":"void 0"}}}
```

#### Events

```json
[{"name":"update:modelValue","description":"","tags":[],"type":"[value: number]","signature":"(event: \"update:modelValue\", value: number): void","schema":["number"]}]
```
