Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-skeleton-image
Advanced tools
A skeleton image component which handles an image's loading and error states.
A skeleton image component which handles an image's loading and error states.
This is a simple React image component which abstracts away all the dirty work you have to do to handle loading and error states of images.
npm i react-skeleton-image
or
yarn add react-skeleton-image
or
pnpm add react-skeleton-image
After installing the package, import Image
component:
import { Image } from 'react-skeleton-image'
You need to specify both width
and height
for the proper image sizing.
<Image src='https://rb.gy/fgpqyt' width={300} height={200} />
You can also specify the width and height in a container and wrap the Image component with it.
<div style={{ width: 300, height: 200 }}>
<Image src='https://rb.gy/fgpqyt' />
</div>
It is recommended to set css properties like margin
, padding
and border-radius
in the container instead of the Image
component.
<div style={{ width: 300, height: 200, margin: 30 }}>
<Image src='https://rb.gy/fgpqyt' />
</div>
Name | Type | Description |
---|---|---|
width | number | The width of the image in px . |
height | number | The height of the image in px . |
skeleton | boolean | Show skeleton loading. Default: true . |
skeletonClassName | string | The custom CSS class for skeleton loading. |
inline | boolean | Set Image's display property to inline-block . Default: false . |
FAQs
A skeleton image component which handles an image's loading and error states.
The npm package react-skeleton-image receives a total of 1 weekly downloads. As such, react-skeleton-image popularity was classified as not popular.
We found that react-skeleton-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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.