File Uploader

Creates a dropzone for file uploads.

Accessibility

  • "Browse files" has aria-controls="fileupload" set.

When to use

  • Enable file(s) upload through drag and drop or the system Browse files dialog.

File uploader basic usage

Drop files here to upload
or

File upload with error

Drop files here to upload
or

File upload with unknown progress

Drop files here to upload
or

File uploader in disabled state

Drop files here to upload
or

File uploader with overrides

Drop files here to upload
or

Overrides

Additionally, you can fully customize any part of the File Uploader through the overrides prop. The File Uploader consists of multiple subcomponents that are listed bellow and you can override each one of them. To help you identify the names of these subcomponents, you can highlight them through this selector:

Drop files here to upload
or
Something went wrong. Sorry!

Note: You should always use longhand CSS properties. Mixing shorthands and longhands will lead into strange behaviors!

File Uploader API

accept union

react-dropzone: https://github.com/react-dropzone/react-dropzone/blob/master/typings/react-dropzone.d.ts

One of
string,
Array
string

disableClick boolean = true

Disallow clicking on the dropzone container to open file dialog

disabled boolean

getDataTransferItems function

One of
SyntheticDragEventHTMLElement,
SyntheticInputEventHTMLInputElement,
SyntheticDragEvent*,
SyntheticEvent*
=> PromiseArrayOne of
File,
DataTransferItem

maxSize number

minSize number

multiple boolean

name string

onClick function

SyntheticMouseEventHTMLElement => mixed

onFocus function

SyntheticFocusEventHTMLElement => mixed

onBlur function

SyntheticFocusEventHTMLElement => mixed

onKeyDown function

SyntheticKeyboardEventHTMLElement => mixed

onDragStart function

SyntheticDragEventHTMLElement => mixed

onDragEnter function

SyntheticDragEventHTMLElement => mixed

onDragOver function

SyntheticDragEventHTMLElement => mixed

onDragLeave function

SyntheticDragEventHTMLElement => mixed

onDrop function

function
Array
,
Array
,
SyntheticDragEventHTMLElement
=> mixed

onDropAccepted function

function
Array
,
SyntheticDragEventHTMLElement
=> mixed

onDropRejected function

function
Array
,
SyntheticDragEventHTMLElement
=> mixed

onFileDialogCancel function

() => mixed

preventDropOnDocument boolean

errorMessage string

baseui

onCancel function

() => mixed

onRetry function

() => mixed

overrides { Root: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, FileDragAndDrop: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ContentMessage: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ContentSeparator: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, HiddenInput: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ProgressMessage: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ErrorMessage: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ButtonComponent: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>> }<object> = {}

{ Root: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, FileDragAndDrop: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ContentMessage: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ContentSeparator: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, HiddenInput: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ProgressMessage: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ErrorMessage: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>>, ButtonComponent: { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>><<T>> }
$afterFileDrop boolean required
$isDisabled boolean required
$isDragActive boolean required
$isDragAccept boolean required
$isDragReject boolean required
$isFocused boolean required
$theme required
name string required
breakpoints required
small number required
medium number required
large number required
colors required
primary50 string required
primary100 string required
primary200 string required
primary300 string required
primary400 string required
primary string required
primary500 string required
primary600 string required
primary700 string required
negative50 string required
negative100 string required
negative200 string required
negative300 string required
negative400 string required
negative string required
negative500 string required
negative600 string required
negative700 string required
warning50 string required
warning100 string required
warning200 string required
warning300 string required
warning400 string required
warning string required
warning500 string required
warning600 string required
warning700 string required
positive50 string required
positive100 string required
positive200 string required
positive300 string required
positive400 string required
positive string required
positive500 string required
positive600 string required
positive700 string required
white string required
mono100 string required
mono200 string required
mono300 string required
mono400 string required
mono500 string required
mono600 string required
mono700 string required
mono800 string required
mono900 string required
mono1000 string required
black string required
rating200 string required
rating400 string required
colorPrimary string required
colorSecondary string required
background string required
backgroundAlt string required
backgroundInv string required
foreground string required
foregroundAlt string required
foregroundInv string required
border string required
borderAlt string required
borderFocus string required
borderError string required
buttonPrimaryFill string required
buttonPrimaryText string required
buttonPrimaryHover string required
buttonPrimaryActive string required
buttonSecondaryFill string required
buttonSecondaryText string required
buttonSecondaryHover string required
buttonSecondaryActive string required
buttonTertiaryFill string required
buttonTertiaryText string required
buttonTertiaryHover string required
buttonTertiaryActive string required
buttonTertiarySelectedText string required
buttonTertiarySelectedFill string required
buttonMinimalFill string required
buttonMinimalText string required
buttonMinimalHover string required
buttonMinimalActive string required
buttonDisabledFill string required
buttonDisabledText string required
breadcrumbsText string required
breadcrumbsSeparatorFill string required
datepickerBackground string required
datepickerDayFont string required
datepickerDayFontDisabled string required
datepickerDayPseudoSelected string required
datepickerDayPseudoHighlighted string required
fileUploaderBackgroundColor string required
fileUploaderBackgroundColorActive string required
fileUploaderBorderColorActive string required
fileUploaderBorderColorDefault string required
fileUploaderMessageColor string required
linkText string required
linkVisited string required
linkHover string required
linkActive string required
listHeaderFill string required
listBodyFill string required
listIconFill string required
listBorder string required
progressStepsIconActiveFill string required
tickFill string required
tickFillHover string required
tickFillActive string required
tickFillSelected string required
tickFillSelectedHover string required
tickFillSelectedHoverActive string required
tickFillError string required
tickFillErrorHover string required
tickFillErrorHoverActive string required
tickFillErrorSelected string required
tickFillErrorSelectedHover string required
tickFillErrorSelectedHoverActive string required
tickFillDisabled string required
tickBorder string required
tickBorderError string required
tickMarkFill string required
sliderTrackFill string required
sliderTrackFillHover string required
sliderTrackFillActive string required
sliderTrackFillSelected string required
sliderTrackFillSelectedHover string required
sliderTrackFillSelectedActive string required
sliderTrackFillDisabled string required
sliderHandleFill string required
sliderHandleFillHover string required
sliderHandleFillActive string required
sliderHandleFillSelected string required
sliderHandleFillSelectedHover string required
sliderHandleFillSelectedActive string required
sliderHandleFillDisabled string required
sliderHandleInnerFill string required
sliderHandleInnerFillDisabled string required
sliderHandleInnerFillSelectedHover string required
sliderHandleInnerFillSelectedActive string required
sliderBorder string required
sliderBorderHover string required
sliderBorderDisabled string required
inputFill string required
inputFillError string required
inputFillDisabled string required
inputTextDisabled string required
notificationPrimaryBackground string required
notificationPrimaryText string required
notificationPositiveBackground string required
notificationPositiveText string required
notificationWarningBackground string required
notificationWarningText string required
notificationNegativeBackground string required
notificationNegativeText string required
menuFill string required
menuFillHover string required
menuFontDefault string required
menuFontDisabled string required
menuFontHighlighted string required
menuFontSelected string required
paginationTriangleDown string required
headerNavigationFill string required
tabBarFill string required
tabColor string required
shadowFocus string required
shadowError string required
tagBackground string required
tagNeutralBackground string required
tagPrimaryBackground string required
tagPositiveBackground string required
tagWarningBackground string required
tagNegativeBackground string required
tagRGBGradient string required
tagRGBGradientSecondary string required
tagSolidRampUnit string required
tagSolidHoverRampUnit string required
tagSolidActiveRampUnit string required
tagSolidDisabledRampUnit string required
tagSolidFontRampUnit string required
tagSolidFontHoverRampUnit string required
tagLightRampUnit string required
tagLightHoverRampUnit string required
tagLightActiveRampUnit string required
tagLightDisabledRampUnit string required
tagLightFontRampUnit string required
tagLightFontHoverRampUnit string required
tagOutlinedRampUnit string required
tagOutlinedHoverRampUnit string required
tagOutlinedActiveRampUnit string required
tagOutlinedDisabledRampUnit string required
tagOutlinedFontRampUnit string required
tagOutlinedFontHoverRampUnit string required
tagFontDisabledRampUnit string required
tagNeutralSolidBackground string required
tagNeutralSolidHover string required
tagNeutralSolidActive string required
tagNeutralSolidDisabled string required
tagNeutralSolidFont string required
tagNeutralSolidFontHover string required
tagNeutralLightBackground string required
tagNeutralLightHover string required
tagNeutralLightActive string required
tagNeutralLightDisabled string required
tagNeutralLightFont string required
tagNeutralLightFontHover string required
tagNeutralOutlinedBackground string required
tagNeutralOutlinedHover string required
tagNeutralOutlinedActive string required
tagNeutralOutlinedDisabled string required
tagNeutralOutlinedFont string required
tagNeutralOutlinedFontHover string required
tagNeutralFontDisabled string required
tagPrimarySolidBackground string required
tagPrimarySolidHover string required
tagPrimarySolidActive string required
tagPrimarySolidDisabled string required
tagPrimarySolidFont string required
tagPrimarySolidFontHover string required
tagPrimaryLightBackground string required
tagPrimaryLightHover string required
tagPrimaryLightActive string required
tagPrimaryLightDisabled string required
tagPrimaryLightFont string required
tagPrimaryLightFontHover string required
tagPrimaryOutlinedBackground string required
tagPrimaryOutlinedHover string required
tagPrimaryOutlinedActive string required
tagPrimaryOutlinedDisabled string required
tagPrimaryOutlinedFont string required
tagPrimaryOutlinedFontHover string required
tagPrimaryFontDisabled string required
tagPositiveSolidBackground string required
tagPositiveSolidHover string required
tagPositiveSolidActive string required
tagPositiveSolidDisabled string required
tagPositiveSolidFont string required
tagPositiveSolidFontHover string required
tagPositiveLightBackground string required
tagPositiveLightHover string required
tagPositiveLightActive string required
tagPositiveLightDisabled string required
tagPositiveLightFont string required
tagPositiveLightFontHover string required
tagPositiveOutlinedBackground string required
tagPositiveOutlinedHover string required
tagPositiveOutlinedActive string required
tagPositiveOutlinedDisabled string required
tagPositiveOutlinedFont string required
tagPositiveOutlinedFontHover string required
tagPositiveFontDisabled string required
tagWarningSolidBackground string required
tagWarningSolidHover string required
tagWarningSolidActive string required
tagWarningSolidDisabled string required
tagWarningSolidFont string required
tagWarningSolidFontHover string required
tagWarningLightBackground string required
tagWarningLightHover string required
tagWarningLightActive string required
tagWarningLightDisabled string required
tagWarningLightFont string required
tagWarningLightFontHover string required
tagWarningOutlinedBackground string required
tagWarningOutlinedHover string required
tagWarningOutlinedActive string required
tagWarningOutlinedDisabled string required
tagWarningOutlinedFont string required
tagWarningOutlinedFontHover string required
tagWarningFontDisabled string required
tagNegativeSolidBackground string required
tagNegativeSolidHover string required
tagNegativeSolidActive string required
tagNegativeSolidDisabled string required
tagNegativeSolidFont string required
tagNegativeSolidFontHover string required
tagNegativeLightBackground string required
tagNegativeLightHover string required
tagNegativeLightActive string required
tagNegativeLightDisabled string required
tagNegativeLightFont string required
tagNegativeLightFontHover string required
tagNegativeOutlinedBackground string required
tagNegativeOutlinedHover string required
tagNegativeOutlinedActive string required
tagNegativeOutlinedDisabled string required
tagNegativeOutlinedFont string required
tagNegativeOutlinedFontHover string required
tagNegativeFontDisabled string required
tableHeadBackgroundColor string required
tableBackground string required
tableFilter string required
tableFilterHeading string required
tableFilterBackground string required
tableFilterFooterBackground string required
toastText string required
toastPrimaryBackground string required
toastPositiveBackground string required
toastWarningBackground string required
toastNegativeBackground string required
spinnerTrackFill string required
progressbarTrackFill string required
tooltipBackground string required
tooltipText string required
typography required
font100 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font200 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font250 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font300 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font350 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font400 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font450 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font500 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font600 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font700 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font800 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font900 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
font1000 required
fontFamily string required
fontWeight union required One of
string,
number
fontSize string required
lineHeight union required One of
string,
number
sizing required
scale0 string required
scale100 string required
scale200 string required
scale300 string required
scale400 string required
scale500 string required
scale550 string required
scale600 string required
scale700 string required
scale800 string required
scale900 string required
scale1000 string required
scale1200 string required
scale1400 string required
scale1600 string required
scale2400 string required
scale3200 string required
scale4800 string required
lighting required
shadow400 string required
shadow500 string required
shadow600 string required
shadow700 string required
overlay0 string required
overlay100 string required
overlay200 string required
overlay300 string required
overlay400 string required
overlay500 string required
overlay600 string required
animation required
timing100 string required
timing400 string required
timing700 string required
easeOutCurve string required
easeInCurve string required
easeInOutCurve string required
borders required
border100 required
borderColor string required
borderStyle string required
borderWidth string required
border200 required
borderColor string required
borderStyle string required
borderWidth string required
border300 required
borderColor string required
borderStyle string required
borderWidth string required
border400 required
borderColor string required
borderStyle string required
borderWidth string required
border500 required
borderColor string required
borderStyle string required
borderWidth string required
border600 required
borderColor string required
borderStyle string required
borderWidth string required
useRoundedCorners boolean required
radius100 string required
radius200 string required
radius300 string required
zIndex required
modal number required
icons
Alert react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
ArrowDown react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
ArrowLeft react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
ArrowRight react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
ArrowUp react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
CheckIndeterminate react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Check react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
ChevronLeft react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
ChevronRight react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
DeleteAlt react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Delete react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Filter react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Grab react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Menu react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Overflow react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Plus react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Search react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Spinner react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
TriangleDown react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
TriangleLeft react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
TriangleRight react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
TriangleUp react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
Upload react.ComponentType
children Node
size One of
number,
string
color string
title string
overrides
Svg { component: ?ComponentType<<T>>, props: ?{}, style: ?{} | ({}) => ?{} }<<T>> | ComponentType<<T>>
$size One of
number,
string
$color string
$as string
$style nullable Object
$ref Ref*
tooltip object required
backgroundColor string required

progressAmount number

progressMessage string