1.1.4 • Published 4 years ago

ani-react v1.1.4

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Ani-React

version 1.1.32

Getting Started

npm i ani-react

Usage

Component

Example
import Animate from "ani-react"
import "ani-react/dist/animation.css"

const App = ()=>{
return <Animate>
I am fading In
  </Animate>

}
Props
propsvalueavailable options
animationdefault:fade / stringanimation or you can make you Own ending with In and Out
enterdefault:true / booleantrue,false
unMountOnExitdefault:false / booleantrue,false
optionscheck bellow options / object
React props
options
optionsvalueavailable options
durationdefault:1000 / number / unit: msnumber:any
delaydefault:0 / number / unit: msnumber:any
fillModedefault:forwards / stringnone,forwards,backwards,both,initial,inherit
timingFunctiondefault:linear / stringanimation-timing-function css
playStatedefault:runing / stringpaused,running,initial,inherit
directiondefault:normal / stringnormal,reverse,alternate,alternate-reverse,initial,inherit,
countdefault:initial / stringcan be number or infinite,initial,inherit

Hook

Example
import {useAnimate} from "ani-react"
import "ani-react/dist/animation.css"

const App = ()=>{
const {style,setEnter,enter,setOptions} = useAnimate() // add your options

return <div style={style}>
I am fading {enter?"in":"out"}
<button onClick={()=>setEnter(!enter)}>{enter?"in":"out"}</button>

  </div>

}
options
optionvalue
namedefault:fade / string
enterdefault:true / boolean
durationdefault:1000 / number / unit: ms
delaydefault:0 / number / unit: ms
fillModedefault:forwards / string
timingFunctiondefault:linear / string
playStatedefault:runing / string
directiondefault:normal / string
countdefault:initial / string

Animations

name
fade,fadeLeft,fadeRight,fadeUp,fadeDown
slideLeft,slideRight,slideUp,slideDown
zoom,zoomLeft,zoomRight,zoomDown,zoomUp
flipX,flipY
backLeft,backRight,backDown,backUp
bounce,bounceLeft,bounceRight,bounceUp,bounceDown
rotate,rotateUpLeft,rotateUpRight,rotateDownLeft,rotateDownRight
role

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

1.1.4

4 years ago

1.1.32

4 years ago

1.1.31

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago