ForgeComponents
en

Components

j-DragDropElement

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

On drag event displays modal inside given element with text Drop & drop files here. On moving dragged files away from element or dropping dragged files modal will hide. Also on drop event exec function is executed.

Configuration

  • exec {String} the component executes this method if the files are dropped - function(files, e, component)
  • text {String} text to display (default empty)

Example

<ui-component name="dragdropelement" config="exec:console.log;"></ui-component>

Author

Use it with <ui-component name="dragdropelement">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Michal Capo. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="dragdropelement" config="exec:console.log;">
	<button>Upload (drag &amp; drop file)</button>
</ui-component>