Skip to content
Design System
GitHub

File upload

v0.10.1Beta

A drop zone that is also a button: checks type, size and count, and says what it refused.

API reference

Generated from the types. Every part also takes className.

FileUpload

Also takes every prop of <div> (except onDrop, title, children).

onFilesrequired
(files: File[]) => void
onReject
(rejections: FileRejection[]) => void
accept
stringSame syntax as <input accept>: "image/*,.pgm".
multiple
boolean = true
maxSize
numberBytes.
maxFiles
number
disabled
boolean
title
ReactNode = "Drop files here or choose files"
hint
ReactNode
icon
ElementType = Upload
compact
boolean = falseOne line, for a toolbar or a form row.
children
ReactNodeReplace the default content entirely (an avatar, a cover image).