> Shows a placeholder while loading an image. You can also set a fallback to be loaded in case it fails loading the image.
npm install @s-ui/react-image-placeholder> Shows a placeholder while loading an image. You can also set a fallback to be loaded in case it fails loading the image.
``sh`
$ npm install @s-ui/react-image-placeholder --save
js
import ImagePlaceholder from '@s-ui/react-image-placeholder'return (
src='https://satyr.io/1000'
alt='1000x1000'
placeholder={
src: '...',
alt: '...'
...imageTagAttributes
}
fallback={
src: '...',
alt: '...'
...imageTagAttributes
}
/>
)
``
> Find full description and more examples in the demo page.