FormBrowse form components
Dropzone
Drag-and-drop file target with hover and active states.
Live preview
Drop files herePDF, PNG, JPG up to 10 MB
Usage
Adapters:React stableVue stable
index.html
<label class="lm-dropzone">
<strong class="lm-dropzone-title">Drop files</strong>
<input type="file" class="sr-only" />
</label>CSS classes (2)
| Class | Description |
|---|---|
lm-dropzone | Dashed bordered drop region |
lm-dropzone-title | Bold title |
React props (3)
| Prop | Type | Default | Description |
|---|---|---|---|
accept | string | — | MIME types e.g. 'image/*' |
maxSize | number | — | Bytes |
multiple | boolean | — | — |
Accessibility
- Pair with a hidden <input type='file'> for keyboard fallback.
- Announce upload progress via aria-live.
Spotted something wrong? Edit this entry on GitHub.