@bianic-ui/image
Version:
React component for progressive image loading
41 lines (30 loc) ⢠711 B
Markdown
The Image component is used to display images.
```sh
yarn add @bianic-ui/image
```
```jsx
import { Image } from "@bianic-ui/image"
```
```jsx
import React from 'react'
import { Image } from '@bianic-ui/image'
ā
const Example = () => (
<Image src="photo.png" fallbackSrc="placeholdit.com/200x200" alt="A Placeholder Image" />
)
```
You can provide a fallback image for when there is an error loading the `src` of
the image. You can also opt out of this behavior by passing the `ignoreFallback`
prop.
```jsx
<Image
src="photo.png"
fallbackSrc="placeholdit.com/200x200"
alt="A Placeholder Image"
/>
```