Class
TelerikRating

A component that lets you capture and display a rating with keyboard, mouse, and hover interactions. Supports item count, selection and precision modes, disabled/readonly states, templates, ARIA labeling, and change callbacks.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikRating : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikRating

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

TelerikRating()

Declaration

cs-api-definition
public TelerikRating()

Properties

AriaLabel

[Accessibility] Describe the aria-label attribute for the component.

Declaration

cs-api-definition
[Parameter]
public string AriaLabel { get; set; }

Property Value

string

AriaLabelledBy

[Accessibility] Describe the aria-labelledby attribute for the component.

Declaration

cs-api-definition
[Parameter]
public string AriaLabelledBy { get; set; }

Property Value

string

DataSmartPasteDescriptionAttribute

Gets or sets the description used for the data-smart-paste attribute.

Declaration

cs-api-definition
[Parameter]
public string DataSmartPasteDescriptionAttribute { get; set; }

Property Value

string

EnableWebMcpTools

Enables WebMCP tool registration for this Rating. When true, Rating operations are exposed as tools discoverable by AI models through the browser. Default value is false.

Declaration

cs-api-definition
[Parameter]
public bool EnableWebMcpTools { get; set; }

Property Value

bool

Enabled

Defines whether the component should be rendered in a disabled state.

Declaration

cs-api-definition
[Parameter]
public bool Enabled { get; set; }

Property Value

bool

HoverThrottleInterval

Defines the interval for which the value should change on hover.

Declaration

cs-api-definition
[Parameter]
public int HoverThrottleInterval { get; set; }

Property Value

int

Id

The id of the component.

Declaration

cs-api-definition
[Parameter]
public string Id { get; set; }

Property Value

string

ItemTemplate

Defines the Item Template of the component.

Declaration

cs-api-definition
[Parameter]
public RenderFragment<RatingItemTemplateContext> ItemTemplate { get; set; }

Property Value

RenderFragment<RatingItemTemplateContext>

Label

Adds a label next to the rating.

Declaration

cs-api-definition
[Parameter]
public string Label { get; set; }

Property Value

string

Max

Defines the maximum number of items for the component.

Declaration

cs-api-definition
[Parameter]
public double Max { get; set; }

Property Value

double

PrecisionMode

Controls the precision mode of the component. Available options are: Half and Full.

Declaration

cs-api-definition
[Parameter]
public RatingPrecisionMode PrecisionMode { get; set; }

Property Value

RatingPrecisionMode

RatingSettings

Provides configuration for WebMCP tools, such as a Name to distinguish this Rating from others on the same page.

Declaration

cs-api-definition
[Parameter]
public RenderFragment RatingSettings { get; set; }

Property Value

RenderFragment

ReadOnly

[Accessibility] Defines whether the component should be rendered in a readonly state.

Declaration

cs-api-definition
[Parameter]
public bool ReadOnly { get; set; }

Property Value

bool

SelectionMode

Controls the selection mode of the component. Available options are: Single and Continuous.

Declaration

cs-api-definition
[Parameter]
public RatingSelectionMode SelectionMode { get; set; }

Property Value

RatingSelectionMode

Value

Defines the value of the component.

Declaration

cs-api-definition
[Parameter]
public double Value { get; set; }

Property Value

double

ValueChanged

Declaration

cs-api-definition
[Parameter]
public EventCallback<double> ValueChanged { get; set; }

Property Value

EventCallback<double>

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()