Blazorise Rating component

Ratings provide insight regarding others opinions and experiences with a product.

Rating component can be used to allow the users to share their opinion about the product, documentation page, photo and more.

Examples

Basic

To start with a basic example just define the rating color.
<Rating Color="Color.Primary" />

Two-way binding

Binding the selected value to a variable will make it more usable.
<Rating Color="Color.Primary" @bind-SelectedValue="@SelectedValue" MaxValue="10" />
@code{
    int SelectedValue = 7;
}

Attributes

Name Description Type Default
MaxValue Maximum rating value that is allowed to be selected. int 5
ReadOnly Prevents modification of the input’s value. bool false
Disabled Prevent the user interactions and make it appear lighter. bool false
FullIcon Defines the selected icon name. object IconName.Star
EmptyIcon Defines the non-selected icon name. object IconName.Star
FullIconStyle Defines the selected icon style. IconStyle? Solid
EmptyIconStyle Defines the non-selected icon style. IconStyle? Regular
Color Defines the color or icons. Color Warning