npm.io
5.0.1 • Published 6d ago

@uppy/drop-target

Licence
MIT
Version
5.0.1
Deps
0
Size
23 kB
Vulns
0
Weekly
0
Stars
31.0K

@uppy/drop-target

Uppy logo: a smiling puppy above a pink upwards arrow

npm version

The Drop Target plugin lets users drag and drop files onto any element on the page, for example the whole page, and adds them to Uppy. Use it alongside the Dashboard, or with your own UI.

Uppy is being developed by the folks at Transloadit, a versatile file encoding service.

Example

import Uppy from '@uppy/core'
import DropTarget from '@uppy/drop-target'

const uppy = new Uppy()
uppy.use(DropTarget, {
  target: document.body,
})

target is required: an element or a CSS selector. Import @uppy/drop-target/css/style.css for the overlay shown while dragging.

Installation

$ npm install @uppy/drop-target

Documentation

Documentation for this plugin can be found on the Uppy website.

License

The MIT License.

Keywords