1.0.11 • Published 5 years ago
react-safe-pic v1.0.11
react-safe-pic
Install
npm install react-safe-picyarn add react-safe-picUsage
import React from 'react'
import { SafePic } from 'react-safe-pic'
const App = () => {
return (
<SafePic
regularImage={'your-jpg-png-image'}
webpImage={'your-webp-image'}
/>
)
}How it works and when to use it?
Customize your picture?
Props
| Prop | Description |
|---|---|
| regularImage | type: string. here goes the JPG/PNG/SVG image |
| webpImage | type:string. hero goes the .WEBP images |
| filterColor (optional) | type: string. change the color of the filter |
| filterOpacity (optional) | type: number. Set the opacity of the filter mask |
| blur: (optional) | type: string. blur the image |
| errorImage (optional) | type: string. here goes the error image you want to show |
| alt (optional) | type: string. The alt attribute of the images |
| errorImageAlt (optional) | type: string. The alt attribute of the error image |
| borderRadius (optional) | type: string. Put border radius to the image |
License and contact
All feedback is appreciated sooo much and also suggestion about new features are most than welcome!
contact: cristiansagula@gmail.com
MIT © kristain86