- 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.
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 locale
Section titled "locale"Gets/Sets the locale used for getting language, affecting resource strings.
locale: string 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 resourceStrings
Section titled "resourceStrings"The resource strings for localization.
resourceStrings: IFileInputResourceStrings value
Section titled "value"The value of the control. Similar to native file input, this property is read-only and cannot be set programmatically.
value: string Accessors
Section titled "Accessors"files
Section titled "files"Returns the list of selected files.
get files(): FileList
Returns FileList
Events
Section titled "Events"onCancel
Section titled "onCancel"Emitted when the control's file picker dialog is canceled.
onCancel(args: CustomEvent<FileList>): void Parameters
- args:
CustomEvent<FileList>
Returns void
onChange
Section titled "onChange"Emitted when the control's checked state changes.
onChange(args: CustomEvent<FileList>): void Parameters
- args:
CustomEvent<FileList>