Skip to content

image-component/react-image-follow

Repository files navigation

🌈 react-image-follow

A React image component. The image follow with the mouse.

npm dumi codecov

πŸ“š Example

Online Preview: https://image-component.github.io/react-image-follow/

πŸŒ€ Template

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

πŸ“¦ Install

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

πŸŽ‰ Usage

import Imagefollow from 'react-image-follow';
import 'react-image-follow/assets/index.css';

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

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

πŸ“” API

Property Description Type Required Default Version
alt The alt of the image. string βœ– - 1.0.0
className Component extra class. string βœ– - 1.0.0
radius The border radius of the component. number βœ– 8 1.0.0
src The src of the image. string βœ” - 1.0.0
style Component extra style. CSSProperties βœ– - 1.0.0
href Component click link string βœ– - 1.0.0

πŸ”¨ Development

yarn
yarn start

License

MIT