images

A Simple realization of image shadow with react

Dec 07, 2020
A Simple realization of image shadow with react

react-image-shadow

A React image component. Simple realization of image shadow.

View Demo View Github

???? Install

npm i react-image-shadow # or yarn add react-image-shadow

???? Usage

import ImageShadow from 'react-image-shadow'; import 'react-image-shadow/assets/index.css'; export default () => ( <> <ImageShadow src="https://github.com/image-tool/react-image-shadow/blob/main/image/red.png?raw=true" /> </> );

???? API

PropertyDescriptionTypeRequiredDefault
classNameComponent extra class.string-
shadowBlurThe shadow blur of the image.number20
shadowHoverWhether to support the mouse hover.booleanfalse
shadowRadiusThe border radius of the image.number8
srcThe src of the image.string-
styleComponent extra style.CSSProperties-
widthThe width of the image.number300

???? Development

yarn yarn start

GitHub

Recommended