DocumentationDownloads and examples

FileUploader

FileUploader component is a styled component. This component has the following props to control its different states and variants.

FileUploader Props

NameUseTypeDefinition
fullWidth
optional
booleanDefine full width in the parent for component
small
optional
booleanDefine the size for button
secondary
optional
booleanDefine if button is secondary
multiple
optional
booleanDefine if is possible to upload one or more files
dragAndDrop
optional
booleanDefine if is drag and drop variable
disabled
optional
booleanDefine if is disabled
id
optional
stringSet id for input
label
optional
stringSet label for component
formats
required
stringSet accept formats for file or files
max
required
numberSet max size of file in MB, only for show in the info message
value
optional
booleanDefine the value of file or files in component
onChange
required
anyFunction to call when files is changed
className
optional
anySet different classes for file uploader component

Examples

Simple FileUploader
Simple default FileUploader example
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Small FileUploader
Small FileUploader example by adding small props
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Drag and Drop FileUploader
Drag and Drop FileUploader example by adding dragAndDrop props
Click or drag-and-drop files here to upload
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Full width FileUploader
Full width FileUploader example by adding fullWidth props
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Multiple FileUploader
Multiple FileUploader example by adding multiple props
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Multiple Drag and Drop FileUploader
Multiple Drag and Drop FileUploader example by adding multiple props
Click or drag-and-drop files here to upload
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Secondary FileUploader
Secondary FileUploader example by adding secondary props
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Disabled FileUploader
Disabled FileUploader example by adding disabled props
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf
Disabled Drag and Drop FileUploader
Disabled Drag and Drop FileUploader example by adding disabled props
Click or drag-and-drop files here to upload
Max file size is 1MB. Only application/vnd.ms-excel, application/pdf