|
@@ -6,7 +6,7 @@ permalink: docs/drag-drop/
|
|
alias: docs/dragdrop/
|
|
alias: docs/dragdrop/
|
|
---
|
|
---
|
|
|
|
|
|
-DragDrop renders a simple Drag and Drop area for file selection. Useful when you only want the local device as a file source, don’t need file previews and metadata editing UI, and the [Dashboard](/docs/dashboard/) feels like an overkill.
|
|
|
|
|
|
+DragDrop renders a simple drag and drop area for file selection. it can be useful when you only want the local device as a file source, don’t need file previews and a UI for metadata editing, and the [Dashboard](/docs/dashboard/) feels like overkill.
|
|
|
|
|
|
```js
|
|
```js
|
|
const DragDrop = require('@uppy/drag-drop')
|
|
const DragDrop = require('@uppy/drag-drop')
|
|
@@ -22,12 +22,16 @@ uppy.use(DragDrop, {
|
|
|
|
|
|
This plugin is published as the `@uppy/drag-drop` package.
|
|
This plugin is published as the `@uppy/drag-drop` package.
|
|
|
|
|
|
|
|
+Install from NPM:
|
|
|
|
+
|
|
```shell
|
|
```shell
|
|
npm install @uppy/drag-drop
|
|
npm install @uppy/drag-drop
|
|
```
|
|
```
|
|
|
|
|
|
## Options
|
|
## Options
|
|
|
|
|
|
|
|
+The DragDrop plugin has the following configurable options:
|
|
|
|
+
|
|
```js
|
|
```js
|
|
uppy.use(DragDrop, {
|
|
uppy.use(DragDrop, {
|
|
target: null,
|
|
target: null,
|
|
@@ -58,7 +62,7 @@ Drag and drop area height, set in inline CSS, so feel free to use percentage, pi
|
|
|
|
|
|
### `note: null`
|
|
### `note: null`
|
|
|
|
|
|
-Optionally specify a string of text that explains something about the upload for the user. This is a place to explain `restrictions` that are put in place. For example: `'Images and video only, 2–3 files, up to 1 MB'`.
|
|
|
|
|
|
+Optionally, specify a string of text that explains something about the upload for the user. This is a place to explain any `restrictions` that are put in place. For example: `'Images and video only, 2–3 files, up to 1 MB'`.
|
|
|
|
|
|
### `locale: {}`
|
|
### `locale: {}`
|
|
|
|
|