FileUploader

Drag-and-drop file upload zone with file list and status indicators.

Category: inputs · WCAG 2.2-AA · upload, file, drop, drag, input, form

States

Props

PropTypeDefaultDescription
filesUploaderFile[][]Controlled file list
onFilesAdded(files: File[]) => voidCalled with accepted files
onRemove(id: string) => voidCalled when a file is removed
multiplebooleanfalseAllow multiple files
acceptstringAccepted file types (MIME or extension)
maxSizenumberMaximum file size in bytes
onRejected(files: File[], reason: 'size' | 'type') => voidCalled with rejected files
labelstringVisible field label rendered above the drop zone; it also names the control.
hintstringHint text below the drop zone
labelsFileUploaderLabelsi18n label overrides
disabledbooleanfalseDisables the upload zone
ariaLabelstringInvisible accessible name, for when a visible element outside this component already labels it and `label` would render that text a second time. ⚠ `label` on this component is **visible**; `IconButton.label`/`Sparkline.label` are invisible names, which is the prior that costs adopters a duplicated label. The raw DOM `aria-label` still wins over this.

Design tokens

When to use

When not to use

How to build an accessible FileUploader in React →

Examples

Basic

Single file upload zone

<FileUploader onFilesAdded={console.log} />

Multiple

Accept multiple files

<FileUploader multiple onFilesAdded={console.log} />

With files

Shows file list

<FileUploader files={[{ id:'1', name:'report.pdf', size:102400, status:'complete' }]} />

Related components

← Back to docs