Interface: UseDropZoneOptions
Defined in: react/src/hooks/useDropZone.ts:13
Extends
Omit<DropZoneOptions,"onStateChange">
Properties
accept?
optional accept?: string;
Defined in: dom/dist/index.d.ts:124
Which files to take, written the way the accept attribute of a file
input is: a comma separated list of extensions (.wav), MIME types
(audio/wav) and type groups (audio/*).
Inherited from
Omit.accept
disabled?
optional disabled?: boolean;
Defined in: dom/dist/index.d.ts:138
Refuse the drop. The drag is still swallowed rather than let through: an unhandled drop makes the browser leave the page and open the file.
Default
false
Inherited from
Omit.disabled
multiple?
optional multiple?: boolean;
Defined in: dom/dist/index.d.ts:131
Take more than one file from a single drop. With it off, only the first
accepted file is reported, as a file input without multiple does.
Default
false
Inherited from
Omit.multiple
onDrop?
optional onDrop?: (files, event) => void;
Defined in: dom/dist/index.d.ts:140
Called with the dropped files that match accept.
Parameters
| Parameter | Type |
|---|---|
files | File[] |
event | DragEvent |
Returns
void
Inherited from
Omit.onDrop
onReject?
optional onReject?: (files, event) => void;
Defined in: dom/dist/index.d.ts:146
Called with the dropped files that do not match accept, so that the
reason can be shown. It comes after onDrop for the same drop, so a list
of rejected files can be cleared in onDrop and filled here.
Parameters
| Parameter | Type |
|---|---|
files | File[] |
event | DragEvent |
Returns
void
Inherited from
Omit.onReject