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-juneUsage
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 AppFeatures
- 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 componentLayout: Layout wrapper componentInput: File input componentPreview: File preview componentSubmitButton: Submit button component
License
MIT