A slider component used to select numeric value within a range.

Element
igc-slider
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.
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.

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

The disabled state of the component.

disabled: boolean

Defined in src/internals/mixins/forms/types.ts:32, src/components/slider/slider-base.ts:179

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Marks the slider track as discrete so it displays the steps. If the step is 0, the slider will remain continuos even if discreteTrack is true.

discreteTrack: boolean = false

Defined in src/components/slider/slider-base.ts:187

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Hides the primary tick labels.

hidePrimaryLabels: boolean = false

Defined in src/components/slider/slider-base.ts:237

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Hides the secondary tick labels.

hideSecondaryLabels: boolean = false

Defined in src/components/slider/slider-base.ts:244

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Hides the thumb tooltip.

hideTooltip: boolean = false

Defined in src/components/slider/slider-base.ts:194

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Sets the control into invalid state (visual state only).

invalid: boolean

Defined in src/internals/mixins/forms/types.ts:39

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(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:251

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

The name of the control, submitted with the form data.

name: string

Defined in src/internals/mixins/forms/types.ts:45

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(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:216

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

The number of secondary ticks. It defaults to 0 which means no secondary ticks are displayed.

secondaryTicks: number = 0

Defined in src/components/slider/slider-base.ts:223

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Specifies the granularity that the value must adhere to.

If set to 0 no stepping is implied and any value in the range is allowed. If labels are provided (projected) then the step is always assumed to be 1 since it is a discrete slider.

step: number = 1

Defined in src/components/slider/slider-base.ts:209

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

The degrees for the rotation of the tick labels. Defaults to 0.

tickLabelRotation: SliderTickLabelRotation = 0

Defined in src/components/slider/slider-base.ts:272

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Changes the orientation of the ticks.

tickOrientation: SliderTickOrientation = 'end'

Defined in src/components/slider/slider-base.ts:230

Optional valueFormat

Section titled "valueFormat"

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

String format used for the thumb and tick label values in the slider.

valueFormat: string

Defined in src/components/slider/slider-base.ts:258

Optional valueFormatOptions

Section titled "valueFormatOptions"

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(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:265

The tagName read-only property of the Element interface returns the tag name of the element on which it's called.

MDN Reference

tagName: "igc-slider" = 'igc-slider'

Defined in src/components/slider/slider.ts:52

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

get defaultValue(): any

Defined in src/internals/mixins/forms/types.ts:127

The initial value of the component.

set defaultValue(value: unknown): void

Defined in src/internals/mixins/forms/types.ts:127

Parameters

  • value: unknown

Returns void

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Returns the HTMLFormElement associated with this element.

get form(): HTMLFormElement | null

Defined in src/internals/mixins/forms/types.ts:48

Returns HTMLFormElement | null

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

get lowerBound(): any

Defined in src/components/slider/slider-base.ts:145

The lower bound of the slider value. If not set, the min value is applied.

set lowerBound(value: number): void

Defined in src/components/slider/slider-base.ts:145

Parameters

  • value: number

Returns void

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

get max(): any

Defined in src/components/slider/slider-base.ts:124

The maximum value of the slider scale. Defaults to 100.

If max is less than min the call is a no-op.

If labels are provided (projected), then max is always set to the number of labels.

If upperBound ends up being greater than than the current max value, it is automatically assigned the new max value.

set max(value: number): void

Defined in src/components/slider/slider-base.ts:124

Parameters

  • value: number

Returns void

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

get min(): any

Defined in src/components/slider/slider-base.ts:95

The minimum value of the slider scale. Defaults to 0.

If min is greater than max the call is a no-op.

If labels are provided (projected), then min is always set to 0.

If lowerBound ends up being less than than the current min value, it is automatically assigned the new min value.

set min(value: number): void

Defined in src/components/slider/slider-base.ts:95

Parameters

  • value: number

Returns void

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

get upperBound(): any

Defined in src/components/slider/slider-base.ts:162

The upper bound of the slider value. If not set, the max value is applied.

set upperBound(value: number): void

Defined in src/components/slider/slider-base.ts:162

Parameters

  • value: number

Returns void

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

A string containing the validation message of this element.

get validationMessage(): string

Defined in src/internals/mixins/forms/types.ts:54

Returns string

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Returns a ValidityState object for the element.

get validity(): ValidityState

Defined in src/internals/mixins/forms/types.ts:51

Returns ValidityState

get value(): any

Defined in src/components/slider/slider.ts:70

The current value of the component.

set value(value: number): void

Defined in src/components/slider/slider.ts:70

Parameters

  • value: number

Returns void

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Returns true when the element is a candidate for constraint validation.

get willValidate(): boolean

Defined in src/internals/mixins/forms/types.ts:59

Returns boolean

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Checks validity and emits invalid when the control is invalid.

checkValidity(): boolean

Defined in src/internals/mixins/forms/types.ts:114

Returns boolean

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Checks validity and shows the browser message when invalid.

reportValidity(): boolean

Defined in src/internals/mixins/forms/types.ts:117

Returns boolean

Inherited from: FormAssociatedMixin( EventEmitterMixin< IgcSliderComponentEventMap, Constructor<IgcSliderBaseComponent> >(IgcSliderBaseComponent) )

Sets a custom message. Invalid while message is not empty.

setCustomValidity(message: string): void

Defined in src/internals/mixins/forms/types.ts:120

Parameters

  • message: string

Returns void

Decrements the value of the slider by stepDecrement * step, where stepDecrement defaults to 1.

stepDown(stepDecrement: number): void

Defined in src/components/slider/slider.ts:140

Parameters

  • stepDecrement: number

    Optional step decrement. If no parameter is passed, it defaults to 1.

Returns void

Increments the value of the slider by stepIncrement * step, where stepIncrement defaults to 1.

stepUp(stepIncrement: number): void

Defined in src/components/slider/slider.ts:132

Parameters

  • stepIncrement: number

    Optional step increment. If no parameter is passed, it defaults to 1.

Returns void