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 file types the control accepts, as a comma-separated list.

accept: string

Whether the control should receive focus automatically.

autofocus: boolean

Whether the control allows the user to select more than one file.

multiple: boolean

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 selection of the control changes.

onChange(args: CustomEvent<FileList>): void

Parameters

Returns void