1.0.12 • Published 6 years ago

react-droppad v1.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-droppad

React-droppad is a simple to use component that provides drag'n'drop file uploads with nice UI

Showtime logo

Installation

yarn add react-droppad or npm install react-droppad

Usage

Import react-droppad in your React component:

import Droppad from 'react-droppad'

Then In your render function

<Droppad url="UPLOAD_URL" onUploaded={this.onUploaded}/>

Supported props

PropTypeDefualtDescription
urlstring''Upload file to
maxFilesinteger20How many files in multiple
maxFilesSizeinteger8define in MB
acceptedFilesstringjpeg, jpg, png, gifComma seperated string
labelstringMy files
titlestringDrag & drop
subTitlestringyour files here or browse
headersobjectAdded to the xhr request headers
onUploadedfunction()=>{}fired after upload with the response

You can find example of usage in the demo directory, which you can run in a local development server using npm start or yarn run start

layout inspired by : https://dribbble.com/shots/2473854-Daily-UI-Day-031-File-Upload

1.0.12

6 years ago

1.0.11

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago