npm / react-dropzone
react-dropzone
What changed in react-dropzone 5 to 20, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
27 breaking10 new APIs and options3 behavior and defaults2 tooling18 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-dropzone 208 changes
Breaking changes 1
Node.js 20 is no longer supported; the minimum supported Node.js version is now 22.
New APIs and options 2
Adds file removal and selection clearing.
Exposes rejected files from drag operations so applications can access and handle drag file rejections.
Fixes and other changes 5
The root receives aria-disabled only when its role is non-presentational.
getInputProps now passes disabled to the input props.
The hidden file input no longer widens its parent in Safari.
In-flight processing is aborted when the dropzone unmounts, preventing processing from continuing after unmount.
Empty validator error arrays are now accepted.
react-dropzone 197 changes
Breaking changes 1
acceptedFiles and onDropAccepted now return files within the limit instead of rejecting the entire batch.
New APIs and options 2
MIME types can now be grouped in the accept configuration.
Adds paste-to-upload support, allowing developers to handle uploaded files pasted into the dropzone.
Behavior and default changes 1
Validators can now be asynchronous, allowing validation logic that awaits results.
Fixes and other changes 3
Drops on the dropzone are ignored while the file dialog is open.
Dragged files are detected via items kind when the drag event types omit Files.
The file input is hidden in-flow to prevent scroll jumps for users interacting with the dropzone.
react-dropzone 1813 changes
Breaking changes 3
The validator is skipped during drag, changing when validation logic runs.
FileWithPath now requires path or relativePath, so plain File is no longer assignable; type onDrop handlers as File[].
The full extension-to-MIME table is no longer bundled; pass COMMON_MIME_TYPES from file-selector/mime to restore it.
New APIs and options 2
Adds isDragUnknown state so developers can detect when the drag state is unknown.
Adds a prop to override file rejection messages.
Behavior and default changes 1
File size errors are formatted using human-readable units, making rejection messages easier for developers and users to understand.
Tooling 1
@types/react is added as an optional peer dependency for projects needing React type definitions.
Fixes and other changes 6
Prevents the browser from opening files dropped on disabled or noDrag dropzones.
Falls back to the native input when the file picker is blocked.
The root receives aria-disabled when the dropzone is disabled, improving accessibility semantics.
Drop callback event types remain event-shaped, improving type accuracy for callback consumers.
The hidden file input is labeled, improving its accessibility.
Extensions are now enforced when paired with wildcard MIME types in the accept configuration.
react-dropzone 174 changes
Breaking changes 3
defaultProps are removed and replaced by default parameter values.
prop-types support is removed in favor of TypeScript types.
The package now requires React 18 or newer.
Tooling 1
Hand-written typings are replaced by declarations generated from the source.
react-dropzone 164 changes
Breaking changes 4
The dist/es/ output path is removed, requiring consumers of old deep-import paths to migrate.
The package now uses an exports map with ESM and CJS entry points.
Building the package now requires Node 20 or newer.
The UMD build is removed, so CDN and script-tag consumers must migrate.
react-dropzone 151 changes
Breaking changes 1
isDragReject now reflects only active drag state and clears after drop; use fileRejections or onDropRejected/onDrop for post-drop rejection UI.
react-dropzone 147 changes
Breaking changes 2
The accept/reject state is computed only on drag enter and drop.
Removes the draggedFiles prop from the returned hook state.
New APIs and options 1
Adds state for detecting drag activity at the document level.
Fixes and other changes 4
Prevents the tarball from being included in the published package, avoiding unintended package contents for users.
The dragLeave filter logic is corrected.
Files with an empty type are now accepted during drag events.
Adds support for React 18.
react-dropzone 132 changes
Breaking changes 1
Now requires an object instead of a string or array of strings, and allows file extensions to be passed to the file picker options.
New APIs and options 1
Adds a callback so users can handle errors.
react-dropzone 122 changes
Breaking changes 1
The accept attribute no longer works with file extensions.
Behavior and default changes 1
The file system access API is enabled by default.
react-dropzone 115 changes
Breaking changes 3
The second callback argument is now an array of FileRejection objects, providing reasons why files were rejected.
The first callback argument is now an array of FileRejection objects, providing reasons why files were rejected.
The return value now uses fileRejections instead of rejectedFiles.
New APIs and options 2
Introduces a type describing an error with a message and code.
Introduces a type describing a rejected file and its errors.
react-dropzone 102 changes
Breaking changes 2
The property getDataTransferItems was renamed to getFilesFromEvent.
React >= 16.8 is required to use this release.
react-dropzone 91 changes
Breaking changes 1
The deprecated prop was removed. To prevent the default click behavior, use an onClick handler that calls preventDefault().
react-dropzone 81 changes
Breaking changes 1
Dropzone is now headless and requires a rendering function, provided as children or a prop.
react-dropzone 71 changes
Breaking changes 1
The preview field was removed from File to avoid possible memory leaks; create previews in onDrop() with URL.createObjectURL() and revoke them when done.
react-dropzone 61 changes
Breaking changes 1
Drag callbacks are no longer executed for non-file items; react-dropzone ignores items that aren't of type File.
react-dropzone 51 changes
Breaking changes 1
All files are rejected in a single file drop, changing the behavior relied on by some applications.