Rating
A star rating input for collecting feedback.
Installation
dotnet add package Lumeo
One-time app setup (AddLumeo(), CSS & JS) is covered in the
installation guide.
Usage
@using Lumeo <Rating />
When to Use
- Product or service reviews where users submit star ratings
- Feedback forms for satisfaction or experience scoring
- Displaying average ratings in read-only mode on product cards
- Any scenario requiring a quick visual numeric rating (e.g., difficulty, quality)
Value: 3.5
Pick a size to see the star scale live.
Size: Default — Value: 3
Mobile (rc.49). The star rating now uses pointer events so users can drag a finger across the stars to set a value in one smooth gesture — no need to lift and tap each star individually.
API Reference
Rating
| Property | Type | Default | Description |
|---|---|---|---|
| Value | double | 0 | Current rating value. |
| Max | int | 5 | Maximum number of stars. |
| AllowHalf | bool | false | Enable half-star precision. |
| ReadOnly | bool | false | Disable user interaction. |
| Size | RatingSize | Default | Star size. Values: Small, Default, Large. |
| Icon | RenderFragment? | null | Custom icon replacing default stars. |
| ValueChanged | EventCallback<double> | — | Two-way binding callback; fires when the rating changes. |
| IconContent | RenderFragment? | null | Custom icon slot used for each rating unit. |
| ErrorText | string? | null | Error message displayed below the rating when Invalid is true. |
| HelperText | string? | null | Helper text shown below the rating when not invalid. |
| Invalid | bool | false | Applies error styling. Syncs with a parent FormField. |
| Label | string? | null | Label rendered above the rating (standalone, without FormField). |
| Name | string? | null | HTML name attribute for form submission. |
| Required | bool | false | Marks the field as required. Syncs with a parent FormField. |