A range slider component used to select two numeric values within a range.
- Slots
-
default— Renders slider labels. Their text replaces the numbers in the thumb and tick labels.
- CSS Parts
-
base— The base wrapper of the slider. -
ticks— The ticks container. -
tick-group— The tick group container. -
tick— The tick element. -
tick-label— The tick label element. -
tick-label-inner— The inner element of the tick label. -
thumbs— The thumbs container. -
thumb— The thumb element. -
focused— Added to the thumb part when the thumb has keyboard focus. -
thumb-label— The thumb tooltip label container. -
thumb-label-inner— The thumb tooltip label inner element. -
track— The track container. -
steps— The track steps element. -
inactive— The inactive element of the track. -
fill— The filled part of the track.
Properties
Section titled "Properties"disabled
Section titled "disabled"Whether the slider is disabled. A disabled slider ignores user interaction.
disabled: boolean discreteTrack
Section titled "discreteTrack"Whether the track shows the steps. It has no effect when step is 0.
discreteTrack: boolean hidePrimaryLabels
Section titled "hidePrimaryLabels"Whether the labels of the primary ticks are hidden.
hidePrimaryLabels: boolean hideSecondaryLabels
Section titled "hideSecondaryLabels"Whether the labels of the secondary ticks are hidden.
hideSecondaryLabels: boolean locale
Section titled "locale"The locale used to format the thumb and tick label values in the slider.
locale: string lowerBound
Section titled "lowerBound"The lower bound of the slider value. If not set, the min value is applied.
lowerBound: number The maximum value of the slider scale. Defaults to 100.
If max is less than min, the update keeps the previous max. The
update checks the values after all of them are set, so the order of the
attributes has no effect.
With slider labels in the default slot, max is always the number of
labels minus one.
If upperBound is greater than max, the slider uses max as the upper bound.
max: number The minimum value of the slider scale. Defaults to 0.
If min is greater than max, the update keeps the previous min. The
update checks the values after all of them are set, so the order of the
attributes has no effect.
With slider labels in the default slot, min is always 0.
If lowerBound is less than min, the slider uses min as the lower bound.
min: number primaryTicks
Section titled "primaryTicks"The number of primary ticks. It defaults to 0 which means no primary ticks are displayed.
primaryTicks: number secondaryTicks
Section titled "secondaryTicks"The number of secondary ticks between two primary ticks. Without primary ticks, it is the total number of ticks. The default 0 shows no secondary ticks.
secondaryTicks: number The interval between two valid values, counted from min.
If set to 0 no stepping is implied and any value in the range is allowed. A negative step is not valid, so the previous step stays. With slider labels in the default slot, the step is always 1.
step: number thumbLabelLower
Section titled "thumbLabelLower"The accessible name of the lower thumb.
thumbLabelLower: string thumbLabelUpper
Section titled "thumbLabelUpper"The accessible name of the upper thumb.
thumbLabelUpper: string tickLabelRotation
Section titled "tickLabelRotation"The degrees for the rotation of the tick labels. Defaults to 0.
tickLabelRotation: SliderTickLabelRotation tickOrientation
Section titled "tickOrientation"Where the ticks are drawn: before the track (start), after it (end),
or on both sides (mirror).
tickOrientation: SliderTickOrientation upper
Section titled "upper"The current value of the upper thumb. Until it is set, and after the
attribute is removed, it follows upperBound.
upper: number upperBound
Section titled "upperBound"The upper bound of the slider value. If not set, the max value is applied.
upperBound: number valueFormat
Section titled "valueFormat"String format used for the thumb and tick label values in the slider.
The {0} placeholder holds the formatted number.
valueFormat: string | undefined valueFormatOptions
Section titled "valueFormatOptions"Number format options used for the thumb and tick label values in the slider.
valueFormatOptions: NumberFormatOptions | undefined Methods
Section titled "Methods"Removes focus from the thumb.
blur(): void Returns void
disconnectedCallback
Section titled "disconnectedCallback"Invoked when the component is removed from the document's DOM.
This callback is the main signal to the element that it may no longer be
used. disconnectedCallback() should ensure that nothing is holding a
reference to the element (such as event listeners added to nodes external
to the element), so that it is free to be garbage collected.
``
An element may be re-connected after being disconnected.
disconnectedCallback(): void Returns void
focus
Section titled "focus"Sets focus on the thumb, or on the lower thumb of a range slider. A thumb that has the focus keeps it. A disabled slider does not take the focus.
focus(options: FocusOptions): void Parameters
- options:
FocusOptions
Returns void
Events
Section titled "Events"onChange
Section titled "onChange"Emitted when a value change is committed on a thumb drag end or keyboard interaction.
onChange(args: CustomEvent<IgrRangeSliderValueEventArgs>): void Parameters
Returns void
onInput
Section titled "onInput"Emitted when a value is changed via thumb drag or keyboard interaction.
onInput(args: CustomEvent<IgrRangeSliderValueEventArgs>): void