FileUpload
Drag-and-drop file upload with preview. Supports file type filtering and size limits.
Preview
Usage
import { FileUpload } from '@ramtt/ui'
<FileUpload
accept=".fit,.gpx"
onUpload={(file) => handleFile(file)}
label="Activity file"
description="Drop a FIT or GPX file"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| onUpload* | (file: File) => void | — | Upload handler |
| accept | string | — | Accepted file types |
| label | string | — | Label text |
| description | string | — | Help text |
| maxSize | number | 10485760 | Max file size in bytes (10MB) |
| disabled | boolean | false | Disable upload |