1.0.15 • Published 3 years ago

@pikooli/react-prev-img v1.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

react-prev-img

A react image picker with preview

It let you pick files from your computer and display only the first one.

Install :

npm install react-prev-img

How to use it :

import ReactPrevImg from "@pikooli/react-prev-img";

const Component = () => {

  const [files, setFiles] = useState({});

  return (
    <ReactPrevImg files={files.files} setFiles={setFiles} />
  )}

You can pass additional options.

Accepted props :

PropsTypeOptional ?Description
widthNumberyeswidth of the display preview
heightNumberyesheight of the display preview
classNamestringyesclass of the preview
acceptstringyestype accepted for input
maxstringyesmax number of file
filesFilenofiles selected
setFilesFunctionnoset selected files

License

Under the MIT license.

1.0.15

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago