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.

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

The autofocus attribute of the control.

autofocus: boolean

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

locale: string

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

multiple: boolean

The resource strings for localization.

resourceStrings: IFileInputResourceStrings

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

value: string

Returns the list of selected files.

get files(): FileList

Returns FileList

Emitted when the control's file picker dialog is canceled.

onCancel(args: CustomEvent<FileList>): void

Parameters

Returns void

Emitted when the control's checked state changes.

onChange(args: CustomEvent<FileList>): void

Parameters

Returns void