- 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.
Constructors
Section titled "Constructors"IgcFileInputComponent
new IgcFileInputComponent(args: any[]): IgcFileInputComponent Defined in src/components/common/mixins/constructor.ts:1
Returns IgcFileInputComponent
Properties
Section titled "Properties"accept
Section titled "accept"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
autofocus
Section titled "autofocus"The autofocus attribute of the control.
autofocus: boolean Defined in src/components/file-input/file-input.ts:197
disabled
Section titled "disabled"Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)
The disabled state of the component.
disabled: boolean invalid
Section titled "invalid"Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)
Sets the control into invalid state (visual state only).
invalid: boolean label
Section titled "label"Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)
The label for the control.
label: string Defined in src/components/input/input-base.ts:68
multiple
Section titled "multiple"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 outlined
Section titled "outlined"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
placeholder
Section titled "placeholder"Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)
The placeholder attribute of the control.
placeholder: string Defined in src/components/input/input-base.ts:61
styles
Section titled "styles"styles: CSSResult[] Defined in src/components/file-input/file-input.ts:79
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-file-input" = 'igc-file-input' Defined in src/components/file-input/file-input.ts:78
Accessors
Section titled "Accessors"defaultValue
Section titled "defaultValue"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
files
Section titled "files"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
locale
Section titled "locale"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
required
Section titled "required"Inherited from: EventEmitterMixin< IgcFileInputComponentEventMap, AbstractConstructor<IgcInputBaseComponent> >(IgcInputBaseComponent)
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
resourceStrings
Section titled "resourceStrings"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
validationMessage
Section titled "validationMessage"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
validity
Section titled "validity"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
value
Section titled "value"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
willValidate
Section titled "willValidate"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
Methods
Section titled "Methods"addEventListener
Section titled "addEventListener"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
checkValidity
Section titled "checkValidity"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
emitEvent
Section titled "emitEvent"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
focus
Section titled "focus"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
removeEventListener
Section titled "removeEventListener"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
reportValidity
Section titled "reportValidity"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
select
Section titled "select"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
setCustomValidity
Section titled "setCustomValidity"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
Section titled "register"register(): void Defined in src/components/file-input/file-input.ts:82
Returns void
Events
Section titled "Events"igcCancel
Section titled "igcCancel"igcCancel: CustomEvent<FileList> Defined in src/components/file-input/file-input.ts:34
igcChange
Section titled "igcChange"igcChange: CustomEvent<FileList> Defined in src/components/file-input/file-input.ts:35