react-uploods

uploods React component

Usage no npm install needed!

<script type="module">
  import reactUploods from 'https://cdn.skypack.dev/react-uploods';
</script>

README

uploods

Travis npm package Coveralls

Describe uploods here.

Property Type Required Default
onChange Func -
containerStyle Object -
inputStyle Object -
hideList Bool false
accept Array ['*']
maxSize Int 10 000 kb
elevation Int 0
text String 'Drag some files here or click to select files'
dragActiveText String 'Drop here!'
unsupportedText String 'Unsupported File...'

onChange

A function to be called everytime a file is included (or removed from list) ex: files => console.log('Uploaded files: ',files)

containerStyle

An object containing the style to be applied to component's container, an MUI's Paper.

inputStyle

An object containing the style to be applied to the input

hideList

If true, will hide the files list

accept

An array containg MIME file types accepted. Supports wildcards like image/*

maxSize = 10000

Maximum size accepted for each file, measured in KB.

elevation = 0

Elevation prop passed to the container, an MUI's Paper

text

Text shown in the input while waiting for files.

dragActiveText

Text shown when user is dragging files over the component.

unsupportedText = 'Unsupported File...'

Text shown when a file is rejected (either by file type or size).