Drop Zone
Upload area: drag files in, or press to choose them.
PDF, 1 to 5 files, up to 10 MB each
Usage
import { DropZone } from '@smartui/react';
import '@smartui/react/styles.css';When to use
- Uploading results and documents.
When not to use
- Profile photos.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
accept | string[] | - | MIME types. |
maxFiles | number | 1 | |
maxSizeMB | number | - | |
hint | string | - | File rules, shown from the start. |
files, onChange | File[], (files) => void | - |
Accessibility
- Works without dragging: Enter opens the file picker.