Svelte Dropzone

-
Pro Component

Dropzone JS is an open-source library that provides drag’n’ drop file uploads with image previews. It is lightweight, doesn’t depend on any other library (like jQuery) and is highly customisable. Dropzone JS supports image previews and shows nice progress bars.
Keep reading our Svelte Dropzone JS examples and learn how to use this plugin.


Usage

<script>
import DropzoneFileUpload from "../../../components/Inputs/DropzoneFileUpload.svelte";
</script>

Examples

Copy any of the code examples below and paste it in your project after you integrated the needed resources.

Single file

...
<script>
let inputs = {
  fileSingle: [],
  fileMultiple: []
};
</script>

<DropzoneFileUpload model={inputs.fileSingle} multiple={false} />

Multiple files

<script>
let inputs = {
  fileSingle: [],
  fileMultiple: []
};
</script>

<DropzoneFileUpload model={inputs.fileMultiple} multiple={true} />