Welcome to the StepOne components documentation
StepOne Fundation
StepOne Modules
FileUploader
FileUploader component is a styled component. This component has the following props to control its different states and variants.
FileUploader Props
| Name | Use | Type | Definition |
| fullWidth | optional | boolean | Define full width in the parent for component |
| small | optional | boolean | Define the size for button |
| secondary | optional | boolean | Define if button is secondary |
| multiple | optional | boolean | Define if is possible to upload one or more files |
| dragAndDrop | optional | boolean | Define if is drag and drop variable |
| disabled | optional | boolean | Define if is disabled |
| id | optional | string | Set id for input |
| label | optional | string | Set label for component |
| formats | required | string | Set accept formats for file or files |
| max | required | number | Set max size of file in MB, only for show in the info message |
| value | optional | boolean | Define the value of file or files in component |
| onChange | required | any | Function to call when files is changed |
| className | optional | any | Set 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/pdfFull 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/pdfSecondary 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