Skip to main content

Upload

Upload file by selecting or dragging.

When To Use#

  • When you need to upload one or more files.
  • When you need to show the process of uploading.
  • When you need to upload files by dragging and dropping.

Examples#

import { Upload } from 'tailor-ui';

Basic#


before select#


Multiple#


failed and success#


API#

PropertyDescriptionTypeDefault
disabledboolean
onSelect(files: File[]) => Promise<any>
onClear(file: File) => void
onBeforeSelect() => Promise<boolean> | boolean
buttonPropsButtonProps
texts{ uploadText?: string; uploadingText?: string; uploadedText?: string; failedText?: string; }

This component is based on react-dropzone, please check it's documentation for more usage.