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.

IgcSliderComponent

new IgcSliderComponent(args: any[]): IgcSliderComponent

Defined in src/components/common/mixins/constructor.ts:1

Returns IgcSliderComponent

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

The disabled state of the component.

disabled: boolean

Defined in src/components/common/mixins/forms/types.ts:29, src/components/slider/slider-base.ts:175

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:183

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

Hides the primary tick labels.

hidePrimaryLabels: boolean = false

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

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

Hides the secondary tick labels.

hideSecondaryLabels: boolean = false

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

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

Hides the thumb tooltip.

hideTooltip: boolean = false

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

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

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

invalid: boolean

Defined in src/components/common/mixins/forms/types.ts:36

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:249

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

The name attribute of the control.

name: string

Defined in src/components/common/mixins/forms/types.ts:42

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:214

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:221

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:270

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:228

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:256

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:263

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(): unknown

Defined in src/components/common/mixins/forms/types.ts:163

Returns unknown

The initial value of the component.

set defaultValue(value: unknown): void

Defined in src/components/common/mixins/forms/types.ts:162

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/components/common/mixins/forms/types.ts:45

Returns HTMLFormElement | null

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

get lowerBound(): number

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

Returns number

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:141

Parameters

  • value: number

Returns void

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

get max(): number

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

Returns number

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:120

Parameters

  • value: number

Returns void

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

get min(): number

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

Returns number

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:91

Parameters

  • value: number

Returns void

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

get step(): number

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

Returns number

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.

set step(value: number): void

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

Parameters

  • value: number

Returns void

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

get upperBound(): number

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

Returns number

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:158

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/components/common/mixins/forms/types.ts:54

Returns string

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

Returns a ValidityState object which represents the different validity states the element can be in, with respect to constraint validation.

get validity(): ValidityState

Defined in src/components/common/mixins/forms/types.ts:51

Returns ValidityState

get value(): number

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

Returns number

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) )

A boolean value which returns true if the element is a submittable element that is a candidate for constraint validation.

get willValidate(): boolean

Defined in src/components/common/mixins/forms/types.ts:60

Returns boolean

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

addEventListener(type: K, listener: object, options: boolean | AddEventListenerOptions): void

Defined in src/components/common/mixins/event-emitter.ts:7

Parameters

  • type: K
  • listener: object
  • options: boolean | AddEventListenerOptions

Returns void

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

Checks for validity of the control and emits the invalid event if it invalid.

checkValidity(): boolean

Defined in src/components/common/mixins/forms/types.ts:146

Returns boolean

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

emitEvent(type: K, eventInitDict: CustomEventInit<D>): boolean

Defined in src/components/common/mixins/event-emitter.ts:30

Parameters

  • type: K
  • eventInitDict: CustomEventInit<D>

Returns boolean

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

removeEventListener(type: K, listener: object, options: boolean | EventListenerOptions): void

Defined in src/components/common/mixins/event-emitter.ts:17

Parameters

  • type: K
  • listener: object
  • options: boolean | EventListenerOptions

Returns void

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

Checks for validity of the control and shows the browser message if it invalid.

reportValidity(): boolean

Defined in src/components/common/mixins/forms/types.ts:149

Returns boolean

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

Sets a custom validation message for the control. As long as message is not empty, the control is considered invalid.

setCustomValidity(message: string): void

Defined in src/components/common/mixins/forms/types.ts:155

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:132

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:124

Parameters

  • stepIncrement: number

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

Returns void

register(): void

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

Returns void

Emitted when a value change is committed on a thumb drag end or keyboard interaction.

igcChange: CustomEvent<number>

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

Emitted when a value is changed via thumb drag or keyboard interaction.

igcInput: CustomEvent<number>

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