Represents a control that provides a menu of options.

Element
igc-select
Slots
default — Renders the list of select items.
prefix — Renders content before the input.
suffix — Renders content after input.
header — Renders a container before the list of options.
footer — Renders a container after the list of options.
helper-text — Renders content below the input.
toggle-icon — Renders content inside the suffix container.
toggle-icon-expanded — Renders content for the toggle icon when the component is in open state.
value-missing — Renders content when the required validation fails.
custom-error — Renders content when setCustomValidity(message) is set.
invalid — Renders content when the component is in invalid state (validity.valid = false).
CSS Parts
list — The list wrapping container for the items of the select.
input — The encapsulated input of the select.
label — The encapsulated text label of the select.
prefix — The prefix wrapper of the input of the select.
suffix — The suffix wrapper of the input of the select.
toggle-icon — The toggle icon wrapper of the select.
helper-text — The helper text wrapper of the select.

Whether the control should receive focus automatically.

autofocus: boolean

Defined in src/components/select/select.ts:233

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

The disabled state of the component.

disabled: boolean

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

The distance of the select dropdown from its input.

distance: number = 0

Defined in src/components/select/select.ts:240

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

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

invalid: boolean

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

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Keeps the dropdown of the component open when the user clicks outside of it.

keepOpenOnOutsideClick: boolean = false

Defined in src/internals/mixins/combo-box.ts:101

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Keeps the dropdown of the component open after the user selects an item.

keepOpenOnSelect: boolean = false

Defined in src/internals/mixins/combo-box.ts:88

The label of the control.

label: string

Defined in src/components/select/select.ts:247

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

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

name: string

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

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Sets the open state of the component.

open: boolean = false

Defined in src/internals/mixins/combo-box.ts:34

Whether the control has an outlined appearance.

outlined: boolean = false

Defined in src/components/select/select.ts:226

The placeholder text of the control.

placeholder: string

Defined in src/components/select/select.ts:254

The preferred placement of the select dropdown around its input.

placement: PopoverPlacement = 'bottom-start'

Defined in src/components/select/select.ts:260

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Sets the behavior of the component when the parent container scrolls.

If the value is hide, the component hides while the anchor is fully out of view. hide is the default value.

If the value is scroll, the component stays visible and anchored.

If the value is close, the component closes on each scroll.

scrollStrategy: PopoverScrollStrategy = 'hide'

Defined in src/internals/mixins/combo-box.ts:49

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-select" = 'igc-select'

Defined in src/components/select/select.ts:133

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

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: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Returns the HTMLFormElement associated with this element.

get form(): HTMLFormElement | null

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

Returns HTMLFormElement | null

Returns the groups of the select component.

get groups(): IgcSelectGroupComponent[]

Defined in src/components/select/select.ts:270

Returns IgcSelectGroupComponent[]

Returns the items of the select component.

get items(): IgcSelectItemComponent[]

Defined in src/components/select/select.ts:263

Returns IgcSelectItemComponent[]

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

get required(): any

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

When set, makes the component a required field for validation.

set required(value: boolean): void

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

Parameters

  • value: boolean

Returns void

Returns the selected item from the dropdown or null.

get selectedItem(): IgcSelectItemComponent | null

Defined in src/components/select/select.ts:277

Returns IgcSelectItemComponent | null

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

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: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

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/select/select.ts:211

The value of the control.

set value(value: string | undefined): void

Defined in src/components/select/select.ts:211

Parameters

  • value: string | undefined

Returns void

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

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

Removes focus from the component.

blur(): void

Defined in src/components/select/select.ts:666

Returns void

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Checks validity and emits invalid when the control is invalid.

checkValidity(): boolean

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

Returns boolean

Resets the current value and selection of the component.

clearSelection(): void

Defined in src/components/select/select.ts:709

Returns void

Sets focus on the component.

focus(options: FocusOptions): void

Defined in src/components/select/select.ts:660

Parameters

  • options: FocusOptions

Returns void

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Hides the component.

hide(): Promise<boolean>

Defined in src/internals/mixins/combo-box.ts:69

Returns Promise<boolean>

Navigates to the item with the specified value. If it exists, returns the found item, otherwise - null.

navigateTo(value: string): IgcSelectItemComponent | null

Defined in src/components/select/select.ts:679

Parameters

  • value: string

Returns IgcSelectItemComponent | null

Checks the validity of the control and moves the focus to it if it is not valid.

reportValidity(): boolean

Defined in src/components/select/select.ts:671

Returns boolean

Selects the item with the specified value. If it exists, returns the found item, otherwise - null.

select(value: string): IgcSelectItemComponent | null

Defined in src/components/select/select.ts:697

Parameters

  • value: string

Returns IgcSelectItemComponent | null

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

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

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Shows the component.

show(): Promise<boolean>

Defined in src/internals/mixins/combo-box.ts:64

Returns Promise<boolean>

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcComboBoxBaseLikeComponent> >(IgcComboBoxBaseLikeComponent) )

Toggles the open state of the component.

toggle(): Promise<boolean>

Defined in src/internals/mixins/combo-box.ts:74

Returns Promise<boolean>