Skip to content
kapable

Dropzone

Forms · 1 export · v0.1.0 · showcase

Progressive file picker with a native input fallback and enhanced drag-and-drop behavior.

Browse 72 component families

Usage

Dropzone usage
<Dropzone label="Attachments" name="files" multiple />

API

Dropzone API

DropzoneProps

File upload as PROGRESSIVE ENHANCEMENT over the native input — the input is the mechanism (JS-off it's a working picker inside your form POST); dragging onto the region and the chosen-files list are island behavior (island doctrine: render inside a clientEntry or you get exactly the native input, which still works). Dropped files land IN the input via DataTransfer, so the form submits them identically either way. The upload itself stays app-owned: this is the field, not the uploader.

Dropzone props
proptypenotes
labelstringVisible label ("Attachments").
namestringForm field name.
accept?string`accept` passthrough ("image/png,.pdf").
multiple?boolean
hint?stringMachine-register constraint line ("png or pdf, up to 5 MB").
listLabel?stringi18n: name for the chosen-files list (default 'Chosen files').
removeLabel?(name: string) => stringi18n: per-file remove label (default `Remove ${name}`).
mix?MixInput

More in Forms

More in Forms