Behive Tech Component Registry

File Dropzone

v0.2.4Stable

A drag-and-drop target with a click-to-browse fallback that reports the chosen `File` objects through `onFiles` — no upload, preview or validation of its own.

pnpm add @behivetech/molecules.file-dropzone

A drag-and-drop target with a click-to-browse fallback that reports the chosen File objects through onFiles — no upload, preview or validation of its own.

Usage

Open in new tab

Properties

FileDropzone props

PropTypeDefaultDescription
onFiles*(files: File[]) => void—Called with the chosen files, from either a drop or the click-to-browse fallback
acceptstring—Native `accept` attribute passed to the underlying file input, e.g. "image/*,application/pdf"
classNamestring—Additional class names to merge with the component root element
labelReactNodeDrag and drop files here, or click to browsePrompt content; defaults to a generic drag-and-drop message
multiplebooleantrueWhether more than one file can be selected at once; defaults to true