Element
igc-file-input
Slots
prefix — Renders content before the input.
suffix — Renders content after input.
helper-text — Renders content below the input.
file-selector-text — Renders content for the browse button when input type is file.
file-missing-text — Renders content when input type is file and no file is chosen.
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
container — The main wrapper that holds all main input elements.
input — The native input element.
label — The native label element.
file-names — The file names wrapper when input type is 'file'.
file-selector-button — The browse button when input type is 'file'.
prefix — The prefix wrapper.
suffix — The suffix wrapper.
helper-text — The helper text wrapper.

IgcFileInputComponent

new IgcFileInputComponent(args: any[]): IgcFileInputComponent

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

Returns IgcFileInputComponent

The accept attribute of the control. Defines the file types as a list of comma-separated values that the file input should accept.

accept: string = ''

Defined in src/components/file-input/file-input.ts:190

The autofocus attribute of the control.

autofocus: boolean

Defined in src/components/file-input/file-input.ts:197

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

The disabled state of the component.

disabled: boolean

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

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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

invalid: boolean

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

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

The label for the control.

label: string

Defined in src/components/input/input-base.ts:68

The multiple attribute of the control. Used to indicate that a file input allows the user to select more than one file.

multiple: boolean = false

Defined in src/components/file-input/file-input.ts:182

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

The name attribute of the control.

name: string

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

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

Whether the control will have outlined appearance.

outlined: boolean = false

Defined in src/components/input/input-base.ts:54

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

The placeholder attribute of the control.

placeholder: string

Defined in src/components/input/input-base.ts:61

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

Defined in src/components/file-input/file-input.ts:78

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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

Returns the list of selected files.

get files(): FileList

Defined in src/components/file-input/file-input.ts:200

Returns FileList

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

Returns the HTMLFormElement associated with this element.

get form(): HTMLFormElement | null

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

Returns HTMLFormElement | null

get locale(): string

Defined in src/components/file-input/file-input.ts:170

Returns string

Gets/Sets the locale used for getting language, affecting resource strings.

set locale(value: string): void

Defined in src/components/file-input/file-input.ts:166

Parameters

  • value: string

Returns void

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

get required(): boolean

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

Returns boolean

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

set required(value: boolean): void

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

Parameters

  • value: boolean

Returns void

get resourceStrings(): IFileInputResourceStrings

Defined in src/components/file-input/file-input.ts:157

Returns IFileInputResourceStrings

The resource strings for localization.

set resourceStrings(value: IFileInputResourceStrings): void

Defined in src/components/file-input/file-input.ts:153

Parameters

  • value: IFileInputResourceStrings

Returns void

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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

The value attribute of the control.

get value(): string

Defined in src/components/file-input/file-input.ts:145

Returns string

The value of the control. Similar to native file input, this property is read-only and cannot be set programmatically.

set value(value: string): void

Defined in src/components/file-input/file-input.ts:139

Parameters

  • value: string

Returns void

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

Removes focus from the control.

blur(): void

Defined in src/components/input/input-base.ts:100

Returns void

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

Sets focus on the control.

focus(options: FocusOptions): void

Defined in src/components/input/input-base.ts:94

Parameters

  • options: FocusOptions

Returns void

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

Selects all the text inside the input.

select(): void

Defined in src/components/input/input-base.ts:88

Returns void

Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)

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

register(): void

Defined in src/components/file-input/file-input.ts:82

Returns void

igcCancel: CustomEvent<FileList>

Defined in src/components/file-input/file-input.ts:34

igcChange: CustomEvent<FileList>

Defined in src/components/file-input/file-input.ts:35