Skip to main content

File Upload

Upload files with drag & drop.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
labelstringDrop files to uploadThe zone's title.
The zone's title.
browseLabelstringchoose from your computerThe link in the line under the title that opens the file picker.
The link in the line under the title that opens the file picker.
hintstring-The rest of that line, after the link, for what this zone accepts.
The rest of that line, after the link, for what this zone accepts.
itemsFileUploadItem[]-
onCancel(id: string) => void-Called with an item's id when its cancel button is pressed.
Called with an item's id when its cancel button is pressed.
descriptionstring-
iconReactNode-
acceptstring-
multiplebooleanfalse
onFilesChange(files: File[]) => void-Called with the whole list whenever it changes, on a pick, a drop or a removal.
Called with the whole list whenever it changes, on a pick, a drop or a removal.
borderdashed | solid | nonedashed
errorstring-
shapenone | rounded | pillrounded
disabledbooleanfalseBlocks the picker and refuses drops, dims the zone and fills it, so it reads as unavailable rather than merely empty.
Blocks the picker and refuses drops, dims the zone and fills it, so it reads as unavailable rather than merely empty.
classNamestring-
focusboolean | stringtrue