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:
public class TelerikSlider<TValue> : TelerikSliderBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikSliderBase<TValue>TelerikSlider<TValue>
Implements:
Inherited Members
Constructors
public TelerikSlider()
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
public override Task SetParametersAsync(ParameterView parameters)
Overrides:
Properties
[Accessibility] Defines the aria-label HTML attribute of the component.
[Parameter]
public string AriaLabel { get; set; }
Adds a title to the drag handle.
[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.
[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.
[Parameter]
public EventCallback<object> OnChange { get; set; }
Defines if the slider should render buttons.
The default value is true.
[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.
[Parameter]
public RenderFragment SliderSettings { get; set; }
Value
TValue
Defines the value of the Slider component. Supports two-way binding.
[Parameter]
public TValue Value { get; set; }
ValueChanged
EventCallback<TValue>
Defines the callback that's called when the Value changes.
[Parameter]
public EventCallback<TValue> ValueChanged { get; set; }
ValueExpression
Expression<Func<TValue>>
Defines the expression that identifies the bound Value.
[Parameter]
public Expression<Func<TValue>> ValueExpression { get; set; }