Upload

An input which allows users to upload a file from their device

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Label

Helper text

Usage

import { Upload } from 'bio-bind-ui';
<Upload
  errorText='Error text'
  helperText='Helper text'
  id='single'
  infoLabel='Select or drag document'
  infoSublabel='jpg, png or pdf (max 5 mb)'
  label='Label'
  labelSelectDocument='SELECT DOCUMENT'
  mode='light'
  onRemoveFile={() => {}}
  onUploadChange={() => {}}
  selectedFiles={null}
  size='sm'
/>

Examples

Size

Set the size prop to sm , md, or lg.

Upload lg size

Helper text

Multiple Upload

Set the isMultiple prop to true or false.

Multi Upload

Helper text

Mode (optional)

Use mode to use dark or light

Label

Helper text

Props

PropsRequiredDefaultTypedescription
labelfalse-stringThe label text for the upload.
stylefalse-CSSPropertiesCustom styles for the upload component.
modefalselightlight darkThe theme mode of the upload (light or dark).
sizefalsesmsm md lgThe size of upload.
infoLabelfalse-stringA label text give information context about upload.
infoSublabelfalse-stringA sub label text give information context about upload.
requiredfalsefalsetrue falseIf true, the upload cannot be empty (required)
helperTextfalse-stringA helper text below the upload
errorTextfalse-stringError text if upload is error
isErrorfalsefalsetrue falseIf true, upload will be set to error state
isMultiplefalsefalsetrue falseIf true, it will able to multiple upload
disabledfalsefalsetrue falseIf true, upload will be set to disabled state
idfalse-stringA unique identifier for the upload
onCapturefalse-functionA callback function upload for capture
onRemoveFilefalse-functionA callback funtion to remove uploaded file
onUploadChangefalse-functionA callback function if upload has changes
selectedFilesfalse-FileListThe selected files state of the upload
labelSelectDocumentfalse-stringA label text on button for choosing file to upload
labelUploadfalse-stringA label text on upload button for multi upload
labelCapturefalse-stringA label text on capture button for multi upload
BIND © Biofarma Innovate Next-level Design .