SliderField

A range slider that lets users select a numeric value by dragging a thumb along a track. The current value is displayed next to the label. Optional min/max labels can be shown beneath the track.

Basic Usage

<ArcadiaForm Model="model">
    <SliderField Field="@nameof(Model.Volume)" Label="Volume" />
</ArcadiaForm>

Custom Range

<SliderField Field="@nameof(Model.Temperature)"
             Label="Temperature"
             Min="-20"
             Max="50"
             Step="0.5"
             ShowMinMax="true" />

Parameters

ParameterTypeDefaultDescription
Valuedouble0The current position of the slider thumb. Supports two-way binding.
ValueChangedEventCallback<double>Callback invoked as the user drags the slider thumb.
Mindouble0The lower bound of the slider range.
Maxdouble100The upper bound of the slider range.
Stepdouble1The increment between selectable values. Use a smaller step for finer granularity.
ShowMinMaxbooltrueWhether min and max values are displayed as labels beneath the slider track.

Inherited from FieldBase

ParameterTypeDefaultDescription
Labelstring?nullVisible label displayed above the field.
HelperTextstring?nullHelper text displayed below the field.
RequiredboolfalseWhether the field is required.
DisabledboolfalseWhether the field is disabled.
ErrorsIReadOnlyList<string>?nullValidation errors to display.
SchemaFieldSchema?nullField schema definition for dynamic form generation.

Validation

public class SettingsModel
{
    [Range(0, 100, ErrorMessage = "Volume must be between 0 and 100.")]
    public double Volume { get; set; } = 50;
}

Accessibility

  • The slider uses aria-valuemin, aria-valuemax, and aria-valuenow to communicate the current state to assistive technologies.
  • Required fields set aria-required="true".
  • Helper text and validation errors are linked via aria-describedby.