Socket
Socket
Sign inDemoInstall

react-prev-img

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-prev-img

A react image picker with preview


Version published
Maintainers
1
Created

Readme

Source

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.

FAQs

Last updated on 11 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc