Sliders

SliderControl · RangeSliderControl

Let users pick a number or a range by dragging or with the arrow keys.

Overview

SliderControl is a Blazor slider that lets users pick a number between a minimum and a maximum by dragging a thumb. Use it for prices, distances or quantities where the range matters more than the exact figure; RangeSliderControl picks a lower and an upper bound, such as a budget band, with two labeled sliders that return one NumericRange. Both are built on the native range input, so the arrow keys work as the browser intends.

Examples

#Slider

Drag the fuel surcharge and the number of pallets: ValueChanged fires while dragging, so the shipping cost updates live. The first slider hides its value with ShowValue="false" and the page formats it; the 8.25% tax rate is set by the carrier contract, so it is Disabled.

Surcharge
12.5%
Pallets
2
Tax rate %
8.25

SHP-0456 by road freight: base rate $480 + 12.5% fuel surcharge = $540, or $270 per pallet

Documentation

ParameterTypeDefaultDescription
Valuedouble0Current number. Two-way with @bind-Value.
Min / Maxdouble0 / 100Bounds, written to the input's min and max.
Stepdouble1Increment for dragging and the arrow keys.
ShowValuebooltrueRenders the raw Value after the track. No format option; hide it to format your own.
DisabledboolfalseDisables the input and dims the host. The base Enabled is not read by this control.
CssClass / Style (base)string?nullOn the host element. The base Visible is not applied; hide the host yourself.
Id / Title / Tag / Data / Parent (base)nullAccepted but not rendered. A written id binds to Id, so it does not reach the input.
(unmatched attributes)Dictionary<string,object>—Written on the <input>, such as aria-label, aria-valuetext, name and data-*.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.