JSPM

react-dropzone-uploader-june

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q39877F
  • License MIT

React file dropzone and uploader: fully customizable, progress indicators, upload cancellation and restart, zero deps and excellent TypeScript support

Package Exports

  • react-dropzone-uploader-june
  • react-dropzone-uploader-june/dist/react-dropzone-uploader.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-dropzone-uploader-june) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Dropzone Uploader June

A React file dropzone and uploader component with full customization, progress indicators, upload cancellation and restart, zero dependencies and excellent TypeScript support.

Installation

npm install react-dropzone-uploader-june

Usage

import React from 'react'
import { Dropzone } from 'react-dropzone-uploader-june'

function App() {
  const getUploadParams = ({ meta }) => {
    return { url: 'https://httpbin.org/post' }
  }

  const handleChangeStatus = ({ meta, file }, status) => {
    console.log(status, meta, file)
  }

  const handleSubmit = (files, allFiles) => {
    console.log(files.map(f => f.meta))
    allFiles.forEach(f => f.remove())
  }

  return (
    <Dropzone
      getUploadParams={getUploadParams}
      onChangeStatus={handleChangeStatus}
      onSubmit={handleSubmit}
      accept="image/*,audio/*,video/*"
      maxFiles={10}
      multiple={true}
      canCancel={true}
      canRemove={true}
      canRestart={true}
      inputContent="Drop Files (Custom Input Message)"
      inputWithFilesContent="Add More Files"
      submitButtonDisabled={false}
      submitButtonContent="Submit Files"
    />
  )
}

export default App

Features

  • Drag & Drop: Full HTML5 drag and drop support
  • File Validation: File type, size, and custom validation
  • Progress Tracking: Real-time upload progress
  • Customizable UI: Fully customizable components and styling
  • TypeScript Support: Complete TypeScript definitions
  • Zero Dependencies: No external dependencies required
  • Upload Control: Cancel, restart, and remove uploads
  • Multiple Files: Support for single or multiple file uploads

Components

  • Dropzone: Main component
  • Layout: Layout wrapper component
  • Input: File input component
  • Preview: File preview component
  • SubmitButton: Submit button component

License

MIT