Class
TelerikSlider<TValue>

A component that lets you select a value with a draggable handle and optional increase/decrease buttons. Supports two-way binding via Value/ValueChanged with ValueExpression for validation, min/max and step logic (inherited), large/small step keyboard navigation, orientation and RTL support, ARIA labeling, and a unified change event through OnChange that fires on commit (drag end/track click/button click).

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TValue

Syntax:

cs-api-definition
public class TelerikSlider<TValue> : TelerikSliderBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikSliderBase<TValue>TelerikSlider<TValue>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TelerikSliderBase<TValue>.OnInitialized()TelerikSliderBase<TValue>.OnParametersSetAsync()TelerikSliderBase<TValue>.OnAfterRenderAsync(bool)TelerikSliderBase<TValue>.Dispose()TelerikSliderBase<TValue>.CascadedEditContextTelerikSliderBase<TValue>.EnabledTelerikSliderBase<TValue>.SmallStepTelerikSliderBase<TValue>.LargeStepTelerikSliderBase<TValue>.MinTelerikSliderBase<TValue>.MaxTelerikSliderBase<TValue>.TickPositionTelerikSliderBase<TValue>.OrientationTelerikSliderBase<TValue>.WidthTelerikSliderBase<TValue>.LabelTemplateTelerikSliderBase<TValue>.DecimalsTelerikSliderBase<TValue>.AriaLabelledByTelerikSliderBase<TValue>.AriaDescribedByTelerikSliderBase<TValue>.TabIndexBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()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.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikSlider()

Declaration

cs-api-definition
public TelerikSlider()

Properties

AriaLabel

[Accessibility] Defines the aria-label HTML attribute of the component.

Declaration

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

Property Value

string

DragHandleTitle

Adds a title to the drag handle.

Declaration

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

Property Value

string

EnableWebMcpTools

Enables WebMCP tool registration for this Slider. When true, Slider 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

OnChange

Specifies the callback that's called when the current value is committed (confirmed) by the user - OnDragEnd, OnClick of slider track, OnClick of increase/decrease button.

Declaration

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

Property Value

EventCallback<object>

ShowButtons

Defines if the slider should render buttons. The default value is true.

Declaration

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

Property Value

bool

SliderSettings

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

Declaration

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

Property Value

RenderFragment

Value

Defines the value of the Slider component. Supports two-way binding.

Declaration

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

Property Value

TValue

ValueChanged

Defines the callback that's called when the Value changes.

Declaration

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

Property Value

EventCallback<TValue>

ValueExpression

Defines the expression that identifies the bound Value.

Declaration

cs-api-definition
[Parameter]
public Expression<Func<TValue>> ValueExpression { get; set; }

Property Value

Expression<Func<TValue>>

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

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

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides TelerikSliderBase<TValue>.SetParametersAsync(ParameterView)