Upload
File upload component with drag and drop, optional max size, and custom placeholder.
Basic Usage
↑Drag and drop or click to upload
import { Upload } from 'uiplex';
<Upload onFileSelect={(files) => console.log(files)} />Multiple Files
↑Drag and drop or click to upload
<Upload multiple onFileSelect={(files) => console.log(files)} />Accept Type
↑Drag and drop or click to upload
<Upload accept="image/*" onFileSelect={...} />Custom Placeholder
Drop your files here
<Upload onFileSelect={...}>
<span>Drop your files here</span>
</Upload>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| onFileSelect | (files: File[]) => void | - | Called with selected files |
| onFilesChange | (files: FileList | null) => void | - | Called with raw FileList |
| accept | string | - | Accept attribute (e.g. "image/*") |
| multiple | boolean | false | Allow multiple files |
| disabled | boolean | false | Disable upload |
| maxSize | number | - | Max file size in bytes |
| children | React.ReactNode | Default placeholder | Custom drop zone content |