Skip to content

image-component/react-image-shadow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

11444f9 Β· Feb 3, 2021

History

66 Commits
Feb 3, 2021
Dec 15, 2020
Jan 5, 2021
Dec 15, 2020
Dec 17, 2020
Dec 4, 2020
Dec 7, 2020
Dec 16, 2020
Dec 7, 2020
Dec 4, 2020
Dec 4, 2020
Dec 4, 2020
Jan 5, 2021
Jan 5, 2021
Dec 4, 2020
Jan 5, 2021
Dec 7, 2020
Jan 5, 2021
Dec 16, 2020
Dec 4, 2020

Repository files navigation

🌈 react-image-shadow

A React image component. Simple realization of image shadow.

npm dumi codecov

πŸ“š Example

Online: https://image-component.github.io/react-image-shadow/

πŸŒ€ Template

https://github.com/one-template/react-component-template

πŸ“¦ 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';

const src =
  'https://github.com/image-component/gallery/blob/main/girl/1.jpg?raw=true';

export default () => (
  <>
    <ImageShadow src={src} />
  </>
);

πŸ“” API

Property Description Type Required Default Version
alt The alt of the image. string βœ– - 1.1.0
className Component extra class. string βœ– - 1.0.0
shadowBlur The shadow blur of the image. number βœ– 20 1.0.0
shadowHover Whether to support the mouse hover. boolean βœ– false 1.0.0
shadowRadius The border radius of the image. number βœ– 8 1.0.0
src The src of the image. string βœ” - 1.0.0
style Component extra style. CSSProperties βœ– - 1.0.0
width The width of the image. number βœ– 300 1.0.0

πŸ”¨ Development

yarn
yarn start

License

MIT