Skip to main content

inno-drag-and-drop

light background
dark background

Properties

PropertyAttributeDescriptionTypeDefault
acceptacceptThe accept attribute specifies the types of files that the server accepts (that can be submitted through a file upload). "https://www.w3schools.com/tags/att_input_accept.asp"stringundefined
disableddisabledDisable all input eventsbooleanfalse
multiplemultipleIf multiple is true the user can drop or select multiple filesbooleanfalse
statestateAfter a file is uploaded you can set the upload component to a defined state"LOADING" | "SELECT_FILE" | "UPLOAD_FAILED" | "UPLOAD_SUCCESS"'SELECT_FILE'
texts--'firstLineText' and 'secondLineText': will be used by state = 'SELECT_FILE',

'orText': The word 'or' or its equivalent translation. Hidden if only 'firstLineText' or only 'secondLineText' is used,

'dragText': displayed when file is dragged over the component, can be omitted,

'loadingText': will be used by state = 'LOADING',

'uploadFailedText': will be used by state = 'UPLOAD_FAILED',

'uploadSuccessText': will be used by state = 'UPLOAD_SUCCESS',

'acceptedFileTypesText': label for accepted file types,

'uploadDisabledText': label for disabled state
DragAndDropTexts{ firstLineText: null, secondLineText: null, orText: null, dragText: null, loadingText: null, uploadFailedText: null, uploadSuccessText: null, acceptedFileTypesText: null, uploadDisabledText: null }
variantvariantColor variant of the component."dark" | "light"'dark'

Events

EventDescriptionType
filesChangedCustomEvent<File[]>

Methods

setFilesToUpload(obj: any) => Promise<void>

Parameters

NameTypeDescription
objany

Returns

Type: Promise<void>

Dependencies

Depends on

Graph


Built with StencilJS