Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
react-files-preview
Advanced tools
[![Netlify Status](https://api.netlify.com/api/v1/badges/f1c6d960-e969-4396-bdaa-33e245a72bf6/deploy-status)](https://app.netlify.com/sites/react-file-view/deploys) [![codecov](https://codecov.io/github/musama619/react-file-view/branch/main/graph/bad
A file view component for react.
Name | Type | Default | Description |
---|---|---|---|
files | File[] | [] | array of file objects |
url | string | null | image url |
downloadFile | boolean | true | enables file download |
removeFile | boolean | true | shows file remove icon on file hover |
showFileSize | boolean | true | shows file size under files |
showSliderCount | boolean | true | shows slides count under file slider |
multiple | boolean | true | accepts one or more files |
accept | string | comma-separated lists of file types. See MIME Types | |
maxFileSize | number | maximum allowed file size in bytes e.g. 1024 x 1024 x 5 == 5MB | |
maxFiles | number | maximum files allowed to be added | |
width | string | basis-11/12 | tailwind css flex-basis class https://tailwindcss.com/docs/flex-basis |
height | string | tailwind css height class https://tailwindcss.com/docs/height | |
fileWidth | string | w-44 | tailwind css width class https://tailwindcss.com/docs/width |
fileHeight | string | h-32 | tailwind css height class https://tailwindcss.com/docs/height |
getFile | func | returns all current files | |
onChange | func | returns selected file(s) | |
onRemove | func | returns the removed file | |
onError | func | returns error message as string | |
onClick | func | returns file on click |
FAQs
A file view component for React apps with images preview, image editing, slider, download option and more.
We found that react-files-preview demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.