Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
simple-react-image
Advanced tools
Simple React Image is tag of react to gracefully manage large and broken images
simple-react-image
is a React Components of <img>
to Gracefully Loading Large Images. additionally it accepts two optional props fallback and errorImage. fallback will be displayed when image will be loading and errorImage will be displyed when any error happend while loading image
npm install --save simple-react-image
or,
yarn add simple-react-image
Prop | type | desciption | required |
---|---|---|---|
fallback | string | loading image | no |
errorImage | string | image on error | no |
onStateChange | function | called on loading state change | no |
all img tags props
import { Image as Img } from 'simple-react-image';
<Img
src={"https://images.pexels.com/photos/813011/pexels-photo-813011.jpeg"}
/>
<Img
src={"https://images.pexels.com/photos/813011/pexels-photo-813011.jpeg"}
fallback="loading image url"
errorImage='image displyed on error'
onStateChange={(state)=>{
console.log(state)
}}
/>
FAQs
Simple React Image is tag of react to gracefully manage large and broken images
The npm package simple-react-image receives a total of 213 weekly downloads. As such, simple-react-image popularity was classified as not popular.
We found that simple-react-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.