Rating component

Rating

Ratings provide insight regarding others opinions and experiences with a product. Users can also rate products they’ve purchased.

<Rating />

Usage

With bind attribute

By using bind-* attribute the selected value will be automatically assigned to the member variable.

<Rating @bind-SelectedValue="@SelectedValue" MaxValue="10" />

@code{
    int SelectedValue;
}

Attributes

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