v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

Dropzone

Drop files with a persistent native chooser alternative.

Interactive preview

Drop files here, or choose files below.

Usage

import { Dropzone } from "@devvy-ui/react";

<Dropzone label="Upload assets" multiple accept="image/*" onFilesChange={setFiles} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
descriptionstringDrop files here…Instructions above the native chooser.
FileUpload propsFileUploadProps—Selection, validation, form and ref behavior.

Accessibility & behavior

Platform Behavior & Guidelines

Uses FileUpload validation and populates the native file input through DataTransfer where supported. If assigning dropped files is unavailable, the chooser remains the explicit fallback.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add dropzone

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Dropzone.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.