@microsoft/fast-foundation > Slider

Slider class

A Slider Custom HTML Element. Implements the ARIA slider.

track - The track of the slider

track-start - The track-start visual indicator

thumb - The slider thumb

  • The default slot for labels

positioning-region - The region used to position the elements of the slider

track-container - The region containing the track elements

track-start - The element wrapping the track start slot

thumb-container - The thumb container element which is programatically positioned

change - Fires a custom 'change' event when the slider value changes

Signature:

export declare class Slider extends FormAssociatedSlider implements SliderConfiguration 

Properties

Property Modifiers Type Description
keypressHandler (e: KeyboardEvent) => void
max number The maximum allowed value.
min number The minimum allowed value.
mode SliderMode The selection mode.
orientation Orientation The orientation of the slider.
readOnly boolean When true, the control will be immutable by user interaction. See readonly HTML attribute for more information.
step number Value to increment or decrement via arrow keys, mouse click or drag.
valueAsNumber number The value property, typed as a number.
valueTextFormatter (value: string) => string | null Custom function that generates a string for the component's "aria-valuetext" attribute based on the current value.

Methods

Method Modifiers Description
decrement() Decrement the value by the step
increment() Increment the value by the step