react-image-dangling
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

🌈 react-image-dangling

A React image component. Dangling interaction effect.

npm dumi codecov

📚 Example

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

🌀 Template

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

📦 Install

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

🎉 Usage

import ImageDangling from 'react-image-dangling';
import 'react-image-dangling/assets/index.css';

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

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

📔 API

Property Description Type Required Default Version
alt The alt of the image. string - 1.0.0
blendMode Whether to enable mix-blend-mode.
When set true, the default is soft-light. More see mix-blend-mode.
boolean | string false 1.0.0
className Component extra class. string - 1.0.0
hoverScale The hover scale of the image. Require >= 1 && <=5. number 1.6 1.0.0
hoverSlope The hover slope of the image. Require >= 10 && <=90. number 60 1.0.0
shadeColor To set the mixed background color when use blendMode. string #000 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
width The width of the image. number 300 1.0.0

🔨 Development

yarn
yarn start

License

MIT

Package Sidebar

Install

npm i react-image-dangling

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

20.8 kB

Total Files

9

Last publish

Collaborators

  • xrkffgg