Explore Templates

Dropzone

react-dropzone-component is one of the most popular drag and drop JavaScript libraries. It is free, fully open source, and makes it easy for you to handle dropped files on your website.

Basic example
Drop files here to upload
import React, { useState } from 'react';
import { DropzoneComponent } from 'react-dropzone-component';
import "dropzone/dist/dropzone.css";

const DropzoneBasicExample = () => {
 //DropZone Config
    var djsConfig = {
        addRemoveLinks: true,
        acceptedFiles: "image/jpeg,image/png,image/gif",
        autoProcessQueue: false,
        uploadprogress: 100
    };
    var componentConfig = {
        iconFiletypes: [".jpg", ".jpeg", ".png", ".gif"],
        showFiletypeIcon: true,
        postUrl: "no-url"
    };
    const handleFileAdded = (file) => {
        console.log(file);
    }
  return (
    <>
        <DropzoneComponent
            config={componentConfig}
            djsConfig={djsConfig}
            eventHandlers={handleFileAdded}
        />
    </>
  );
}

export default DropzoneBasicExample;
<!doctype html>Nubra UI - A Bootstrap based library of modern, reusable and flexible components designed specially for SaaS web applications.
<!doctype html>Nubra UI - A Bootstrap based library of modern, reusable and flexible components designed specially for SaaS web applications.
<!doctype html>Nubra UI - A Bootstrap based library of modern, reusable and flexible components designed specially for SaaS web applications.
<!doctype html>Nubra UI - A Bootstrap based library of modern, reusable and flexible components designed specially for SaaS web applications.