Rxova
Skip to content

UseFileInputResult

addFiles: (candidates) => void;

Add several candidates, applying every rule.

ParameterType
candidatesFile[]

void


announcement: string;

Text for the polite live region. Changes only when there is something to say.


clear: () => void;

Remove every file.

void


disabled: boolean;

dragging: boolean;

A drag carrying files is currently over the drop zone.


entries: FileEntry[];

One entry per file, with a stable key and an optional preview URL.


files: File[];

The selected files.


full: boolean;

maxFiles reached, or a single-file field that already has one.


handleBlur: (event) => void;
ParameterType
eventFocusEvent<HTMLElement>

void


handleDragEnter: (event) => void;

Bind to onDragEnter. This is the handler that counts the drag depth, so binding onDragOver to it as well makes the highlight stick.

ParameterType
eventDragEvent<HTMLElement>

void


handleDragLeave: (event) => void;
ParameterType
eventDragEvent<HTMLElement>

void


handleDragOver: (event) => void;
ParameterType
eventDragEvent<HTMLElement>

void


handleDrop: (event) => void;
ParameterType
eventDragEvent<HTMLElement>

void


handleFocus: (event) => void;
ParameterType
eventFocusEvent<HTMLElement>

void


handleInputChange: (event) => void;
ParameterType
eventChangeEvent<HTMLInputElement>

void


ids: object;
announcement: string;
input: string;
label: string;

Only referenced when label is a node rather than a string.

list: string;
root: string;
zone: string;

inputRef: object;

Structural rather than RefObject: in @types/react 18 RefObject.current is readonly, in 19 it is mutable. Declaring the shape keeps this assignable under both, which matters because react >= 18 is a peer.

current: HTMLInputElement | null;

multiple: boolean;

open: () => void;

Open the native picker. The drop zone calls this on click and on Enter/Space.

void


readOnly: boolean;

removeAt: (index) => void;
ParameterType
indexnumber

void


removeRefs: object;

One slot per rendered remove button, indexed like entries.

current: (HTMLElement | null)[];

sizeOf: (file) => string;

A human-readable size for one file.

ParameterType
fileFile

string


zoneRef: object;

The drop zone, so focus can return to it when the last file goes.

current: HTMLElement | null;