A star rating input component that allows users to provide ratings by selecting a number of stars. RadzenRating displays an interactive or read-only star rating with configurable number of stars and keyboard accessibility. Displays a row of stars (or other symbols) that users can click to select a rating value. The value is an integer from 0 to the number of stars configured. Common uses include product reviews and ratings, user feedback and satisfaction surveys, content quality indicators, and service ratings. Supports keyboard navigation (arrow keys, Space/Enter) for accessibility. Use ReadOnly mode to display ratings without allowing user input.
FormComponent<int>.SetParametersAsync
FormComponent<int>.OnContextMenu
FormComponent<int>.GetClassList
FormComponent<int>.Placeholder
FormComponent<int>.EditContext
FormComponent<int>.ValueChanged
FormComponent<int>.FieldIdentifier
FormComponent<int>.ValueExpression
FormComponent<int>.FormFieldContext
FormComponent<int>.CurrentPlaceholder
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenRating : FormComponent<int>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponentBasic 5-star rating:
<RadzenRating @bind-Value=@rating />
Custom number of stars with change event:
<RadzenRating @bind-Value=@userRating Stars="10" Change=@(args => Console.WriteLine($"Rated: {args} out of 10")) />
Read-only rating display:
<RadzenRating Value=@product.AverageRating Stars="5" ReadOnly="true" />
<RadzenText>@product.AverageRating out of 5 stars</RadzenText>A star rating input component that allows users to provide ratings by selecting a number of stars. RadzenRating displays an interactive or read-only star rating with configurable number of stars and keyboard accessibility. Displays a row of stars (or other symbols) that users can click to select a rating value. The value is an integer from 0 to the number of stars configured. Common uses include product reviews and ratings, user feedback and satisfaction surveys, content quality indicators, and service ratings. Supports keyboard navigation (arrow keys, Space/Enter) for accessibility. Use ReadOnly mode to display ratings without allowing user input.
public RadzenRating()Gets or sets the accessible label text for the clear rating action. Used by screen readers to announce the clear/reset rating button functionality.
public string ClearAriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the accessible label text for the clear rating action. Used by screen readers to announce the clear/reset rating button functionality. |
Gets or sets the accessible label text template for rating actions. Used by screen readers to announce each star's rating value (e.g., "Rate 3 stars").
public string RateAriaLabel { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the accessible label text template for rating actions. Used by screen readers to announce each star's rating value (e.g., "Rate 3 stars"). |
Gets or sets whether the rating is read-only and cannot be changed by user interaction. When true, the stars display the current rating but cannot be clicked or modified. Useful for displaying ratings without allowing users to change them (e.g., showing product ratings).
public bool ReadOnly { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets whether the rating is read-only and cannot be changed by user interaction. When true, the stars display the current rating but cannot be clicked or modified. Useful for displaying ratings without allowing users to change them (e.g., showing product ratings). |
Gets or sets the total number of stars to display in the rating component. The value can range from 0 to this number. Common values are 5 or 10.
public int Stars { get; set; }
| Type | Description |
|---|---|
| int | Gets or sets the total number of stars to display in the rating component. The value can range from 0 to this number. Common values are 5 or 10. |