A range slider component used to select two numeric values within a range.
- Element
-
igc-range-slider
- 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"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Whether the slider is disabled. A disabled slider ignores user interaction.
disabled: boolean = false Defined in src/components/slider/slider-base.ts:225
discreteTrack
Section titled "discreteTrack"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Whether the track shows the steps. It has no effect when step is 0.
discreteTrack: boolean = false Defined in src/components/slider/slider-base.ts:232
hidePrimaryLabels
Section titled "hidePrimaryLabels"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Whether the labels of the primary ticks are hidden.
hidePrimaryLabels: boolean = false Defined in src/components/slider/slider-base.ts:289
hideSecondaryLabels
Section titled "hideSecondaryLabels"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Whether the labels of the secondary ticks are hidden.
hideSecondaryLabels: boolean = false Defined in src/components/slider/slider-base.ts:296
hideTooltip
Section titled "hideTooltip"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Whether the thumb tooltip is hidden.
hideTooltip: boolean = false Defined in src/components/slider/slider-base.ts:239
locale
Section titled "locale"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
The locale used to format the thumb and tick label values in the slider.
locale: string = 'en' Defined in src/components/slider/slider-base.ts:303
primaryTicks
Section titled "primaryTicks"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
The number of primary ticks. It defaults to 0 which means no primary ticks are displayed.
primaryTicks: number = 0 Defined in src/components/slider/slider-base.ts:266
secondaryTicks
Section titled "secondaryTicks"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
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 = 0 Defined in src/components/slider/slider-base.ts:274
thumbLabelLower
Section titled "thumbLabelLower"The accessible name of the lower thumb.
thumbLabelLower: string Defined in src/components/slider/range-slider.ts:131
thumbLabelUpper
Section titled "thumbLabelUpper"The accessible name of the upper thumb.
thumbLabelUpper: string Defined in src/components/slider/range-slider.ts:138
tickLabelRotation
Section titled "tickLabelRotation"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
The degrees for the rotation of the tick labels. Defaults to 0.
tickLabelRotation: SliderTickLabelRotation = 0 Defined in src/components/slider/slider-base.ts:325
tickOrientation
Section titled "tickOrientation"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Where the ticks are drawn: before the track (start), after it (end),
or on both sides (mirror).
tickOrientation: SliderTickOrientation = 'end' Defined in src/components/slider/slider-base.ts:282
Optional valueFormat
Section titled "valueFormat"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
String format used for the thumb and tick label values in the slider.
The {0} placeholder holds the formatted number.
valueFormat: string Defined in src/components/slider/slider-base.ts:311
Optional valueFormatOptions
Section titled "valueFormatOptions"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Number format options used for the thumb and tick label values in the slider.
valueFormatOptions: NumberFormatOptions Defined in src/components/slider/slider-base.ts:318
styles
Section titled "styles"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.
Note on Content Security Policy:
Element styles are implemented with <style> tags when the browser doesn't
support adopted StyleSheets. To use such <style> tags with the style-src
CSP directive, the style-src value must either include 'unsafe-inline' or
nonce-<base64-value> with <base64-value> replaced be a server-generated
nonce.
To provide a nonce to use on generated <style> elements, set
window.litNonce to a server-generated nonce in your page's HTML, before
loading application code:
``
styles: CSSResult[] Defined in src/components/slider/slider-base.ts:99
tagName
Section titled "tagName"The tagName read-only property of the Element interface returns the tag name of the element on which it's called.
tagName: "igc-range-slider" = 'igc-range-slider' Defined in src/components/slider/range-slider.ts:65
Accessors
Section titled "Accessors"lower
Section titled "lower"get lower(): any Defined in src/components/slider/range-slider.ts:91
The current value of the lower thumb.
set lower(val: number): void Defined in src/components/slider/range-slider.ts:91
Parameters
- val:
number
Returns void
lowerBound
Section titled "lowerBound"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
get lowerBound(): any Defined in src/components/slider/slider-base.ts:191
The lower bound of the slider value. If not set, the min value is applied.
set lowerBound(value: number | null | undefined): void Defined in src/components/slider/slider-base.ts:191
Parameters
- value:
number | null | undefined
Returns void
Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
get max(): any Defined in src/components/slider/slider-base.ts:178
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.
set max(value: number): void Defined in src/components/slider/slider-base.ts:178
Parameters
- value:
number
Returns void
Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
get min(): any Defined in src/components/slider/slider-base.ts:156
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.
set min(value: number): void Defined in src/components/slider/slider-base.ts:156
Parameters
- value:
number
Returns void
Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
get step(): any Defined in src/components/slider/slider-base.ts:252
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.
set step(value: number): void Defined in src/components/slider/slider-base.ts:252
Parameters
- value:
number
Returns void
upper
Section titled "upper"get upper(): any Defined in src/components/slider/range-slider.ts:108
The current value of the upper thumb. Until it is set, and after the
attribute is removed, it follows upperBound.
set upper(val: number): void Defined in src/components/slider/range-slider.ts:108
Parameters
- val:
number
Returns void
upperBound
Section titled "upperBound"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
get upperBound(): any Defined in src/components/slider/slider-base.ts:208
The upper bound of the slider value. If not set, the max value is applied.
set upperBound(value: number | null | undefined): void Defined in src/components/slider/slider-base.ts:208
Parameters
- value:
number | null | undefined
Returns void
Methods
Section titled "Methods"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
Removes focus from the thumb.
blur(): void Defined in src/components/slider/slider-base.ts:414
Returns void
disconnectedCallback
Section titled "disconnectedCallback"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
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 Defined in src/components/slider/slider-base.ts:394
Returns void
focus
Section titled "focus"Inherited from: EventEmitterMixin< IgcRangeSliderComponentEventMap, typeof IgcSliderBaseComponent >(HostAriaMixin(IgcSliderBaseComponent))
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 Defined in src/components/slider/slider-base.ts:405
Parameters
- options:
FocusOptions