react-css-animated
React css animation based on animate.css
Install
npm install --save react-css-animated
Usage
import React Component from 'react'; import Animated from 'react-css-animated'; { return <Animated > <h1>Animate</h1> </Animated> ; }
propTypes
AnimatedpropTypes = className: PropTypesstring innerRef: PropTypes tag: PropTypesstring style: PropTypesobject isVisible: PropTypesbool /* you can use your own animations */ animations: PropTypesobject /* eslint-disable react/no-unused-prop-types */ /* These props are used in an external function getAnimatedState */ animationIn: PropTypesstring animationOut: PropTypesstring delay: timeShape duration: timeShape easing: easingShape /* eslint-enable */ animateOnMount: PropTypesbool children: PropTypesnode /* renderContent description: Elements always come new, so there is a reason to rerender. To avoid rerender use the function renderContent instead children. */ renderContent: PropTypesfunc data: PropTypesany onClick: PropTypesfunc; AnimateddefaultProps = tag: 'div' style: animations: isVisible: true animationIn: 'fadeIn' animationOut: 'fadeOut' delay: 0 duration: 300 easing: 'ease' animateOnMount: false; const timeShape = PropTypes; const easingShape = PropTypes;
License
MIT © Alexander Lyalikhov