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).

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.

Callable

  • Returns ReactNode

Accessors

files: FileList

Returns the selected files, if any; otherwise returns null.

Events

onCancel: (args: CustomEvent<FileList>) => void

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

Type declaration

onChange: (args: CustomEvent<FileList>) => void

Emitted when the control's checked state changes.

Type declaration

Properties

accept: string

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

autofocus: boolean

The autofocus attribute of the control.

multiple: boolean

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

value: string

The value of the control.