Uiplex

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

PropTypeDefaultDescription
onFileSelect(files: File[]) => void-Called with selected files
onFilesChange(files: FileList | null) => void-Called with raw FileList
acceptstring-Accept attribute (e.g. "image/*")
multiplebooleanfalseAllow multiple files
disabledbooleanfalseDisable upload
maxSizenumber-Max file size in bytes
childrenReact.ReactNodeDefault placeholderCustom drop zone content