Skip to content

An img component which loads File objects - useful for image uploads

License

Notifications You must be signed in to change notification settings

omaksi/react-file-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-file-image

A minimalistic React img component accepting File objects

Useful when showing images directly from a <input type="file" />

Installation

npm install react-file-image

Props

Only the file Prop is required, it must be a File object

Usage

handleFileInputChange = (e) => {
  const file = e.target.files[0];
}

<FileImage width="300" height="200" file={file} />

License

MIT

About

An img component which loads File objects - useful for image uploads

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published