๐ react-image-shadow
A React image component. Simple realization of image shadow.
๐ Example
Online: https://image-tool.github.io/react-image-shadow/
๐ฆ 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
Property | Description | Type | Required | Default |
---|---|---|---|---|
className | Component extra class. | string | โ | - |
shadowBlur | The shadow blur of the image. | number | โ | 20 |
shadowHover | Whether to support the mouse hover. | boolean | โ | false |
shadowRadius | The border radius of the image. | number | โ | 8 |
src | The src of the image. | string | โ | - |
style | Component extra style. | CSSProperties | โ | - |
width | The width of the image. | number | โ | 300 |
๐จ Development
yarn
yarn start