Rating

Overview

Ratings show people’s opinions of a product, helping others make more informed purchasing decisions. People can also rate products they’ve purchased.

Usage

Rating
Large Stars:
Small Stars:
10 Small Stars:
Disabled:
Half star in readOnly mode:
Custom icons:
Large Stars:<br />
<Rating Size="RatingSize.Large" AriaLabelFormat="Select {0} of {1} stars" />

Small Stars:<br />
<Rating RatingValue="3" />

10 Small Stars:<br />
<Rating AriaLabel="10 small stars" Max="10" />

Disabled:<br />
<Rating Disabled="true" />

Half star in readOnly mode:<br />
<Rating ReadOnly="true" RatingValue="2.5" GetAriaLabel="@((value, max) => $"Half star in readOnly mode rating value is {value.ToString()} of {max.ToString()}")" />

Custom icons:<br />
<Rating RatingValue="2.5" IconName="StarburstSolid" UnselectedIcon="Starburst" />
            
            
Two-Way-Binding
1 of 10 Stars selected!
<Rating Max="10" @bind-RatingValue="rateten" />
@rateten of 10 Stars selected!
            
            
Button Controlled Rating
<Rating AllowZeroStars="true" RatingValue="rate" ReadOnly="true" />
<PrimaryButton OnClick="SetRate" Text="@buttonText" />