New to Telerik UI for BlazorStart a free 30-day trial

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:

C#
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

C#
public TelerikSlider()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
public override Task SetParametersAsync(ParameterView parameters)
Parameters:parametersParameterViewReturns:

Task

Overrides: TelerikSliderBase<TValue>.SetParametersAsync(ParameterView)

Properties

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

C#
[Parameter]
public string AriaLabel { get; set; }

Adds a title to the drag handle.

C#
[Parameter]
public string DragHandleTitle { get; set; }

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.

C#
[Parameter]
public bool EnableWebMcpTools { get; set; }

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.

C#
[Parameter]
public EventCallback<object> OnChange { get; set; }

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

C#
[Parameter]
public bool ShowButtons { get; set; }

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

C#
[Parameter]
public RenderFragment SliderSettings { get; set; }

Value

TValue

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

C#
[Parameter]
public TValue Value { get; set; }

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

C#
[Parameter]
public EventCallback<TValue> ValueChanged { get; set; }

Defines the expression that identifies the bound Value.

C#
[Parameter]
public Expression<Func<TValue>> ValueExpression { get; set; }