animate react element easily
- support ie8,ie8+,chrome,firefox,safari
var Animate = require('rc-animate');
var React = require('react');
React.render(<Animate><p key="1">1</p><p key="2">2</p></Animate>, container);
name | type | default | description |
---|---|---|---|
component | React.Element/String | 'span' | wrap dom node or component for children. set to '' if you do not wrap for only one child |
showProp | String | using prop for show and hide. [demo](http://react-component.github.io/animate/examples/hide-todo.html) | |
exclusive | Boolean | whether allow only one set of animations(enter and leave) at the same time. | |
transitionName | String | transitionName, need to specify corresponding css | |
transitionEnter | Boolean | true | whether support transition enter anim |
transitionLeave | Boolean | true | whether support transition leave anim |
onEnd | function(key:String, enter:Boolean) | true | animation end callback |
animation | Object | {} |
to animate with js. for examples:
```js
{
enter: function(node, done){
node.style.display='none';
|
npm install
npm start
http://localhost:8000/examples/index.md
online example: http://react-component.github.io/animate/examples/
http://localhost:8000/tests/runner.html?coverage
rc-animate is released under the MIT license.