1.1.2 • Published 2 years ago

react-dissolve v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Dissolve

A color and image animated dissolve effect. (❁´◡`❁)

If you like my work, please buy me a coffee. []~( ̄▽ ̄)~*

"Buy Me A Coffee"

Live demo

Check out the Codesandbox live demo

Installation

Download it with npm

npm i react-dissolve

How to use

Import it to anywhere in your project.

import DissolveEffect from "react-dissolve";
<DissolveEffect
 width={500}
 height={500}
 color={"#40DECF"}
 style={{
 maxWidth: "100%",
 }}
/>

And BOOM! 🌟🌟🌟

dissolve effect

Image is supported now!

image dissolve effect

Props 🍞

PropTypeDefaultDescription
animatealways|hover|nonealwaysWhen to animate
animateMobilealways|hover|nonenoneThe same as animate but only apply on mobile devices
breakpointnumber768The breackpoint(in px) for mobile
classNamestringundefinedClass name
srcstringunderfinedSpecifies the path to the image
colorstring#40DECFThe color of the effect
debugbooleanfalseDebug mode will show some indicators of the effect
fade.innerEffectbooleanfalseApply the dissolve effect within the inner circle
fade.innerEdgenumber0A inner circle where the dissolve effect start to fade
fade.outerEdgenumber1A outer circle where the dissolve effect end
fade.offset{x: number, y: number}{x: 0, y: 0}Offset of the center
fade.easelinear|easeIn|easeOut|easeInOutlinearEase the fading
frameRatenumber30Frame rate of the effect\n can only update it on start
handlebooleanfalseToggle the handle so you can change most of the value runtime
heightnumberundefined (required)The height of the canvas
softenShapebooleanfalseSoften the shape of the effect
styleReact.CSSPropertiesundefinedCSS Properties
thresholdnumber0.5Threshold of the dissolve effect
widthnumberundefined (required)The widht of the canvas
zoomnumber40Zoom in/out to scale up/down the shape
1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago