rc-animate
css-transition ui component for react
Last updated 8 years ago by yiminghe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install rc-animate 
SYNC missed versions from official npm registry.

rc-animate


Animate React Component easily.

NPM version build status Test coverage Dependencies DevDependencies npm download bundle size

Install

rc-animate

Usage

import Animate from 'rc-animate';

export default () => (
  <Animate animation={{ ... }}>
    <p key="1">1</p>
    <p key="2">2</p>
  </Animate>
);

Compatibility

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Electron
Electron
IE11, Edge last 2 versions last 2 versions last 2 versions last 2 versions

API

props

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
componentProps Object {} extra props that will be passed to component
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|Object specify corresponding css, see ReactCSSTransitionGroup
transitionAppear Boolean false whether support transition appear anim
transitionEnter Boolean true whether support transition enter anim
transitionLeave Boolean true whether support transition leave anim
onEnd function(key:String, exists:Boolean) true animation end callback
animation Object {} to animate with js. see animation format below.

animation format

with appear, enter and leave as keys. for example:

  {
    appear: function(node, done){
      node.style.display='none';
      $(node).slideUp(done);
      return {
        stop:function(){
          // jq will call done on finish
          $(node).stop(true);
        }
      };
    },
    enter: function(){
      this.appear.apply(this,arguments);
    },
    leave: function(node, done){
      node.style.display='';
      $(node).slideDown(done);
      return {
        stop:function(){
          // jq will call done on finish
          $(node).stop(true);
        }
      };              
    }
  }

Development

npm install
npm start

Example

http://localhost:8200/examples/index.md

online example: http://react-component.github.io/animate/examples/

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-animate is released under the MIT license.

Current Tags

  • 2.6.0-beta.1                                ...           beta (6 years ago)
  • 3.1.1                                ...           latest (4 years ago)

68 Versions

  • 3.1.1                                ...           4 years ago
  • 3.1.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.11.1                                ...           5 years ago
  • 2.11.0                                ...           5 years ago
  • 2.10.3                                ...           5 years ago
  • 2.10.2                                ...           5 years ago
  • 2.10.1                                ...           5 years ago
  • 2.10.0                                ...           5 years ago
  • 2.9.2                                ...           5 years ago
  • 2.9.1                                ...           5 years ago
  • 2.9.0                                ...           5 years ago
  • 2.8.3                                ...           6 years ago
  • 2.8.2                                ...           6 years ago
  • 2.8.1                                ...           6 years ago
  • 2.8.0                                ...           6 years ago
  • 2.7.0                                ...           6 years ago
  • 2.6.0                                ...           6 years ago
  • 2.5.4                                ...           6 years ago
  • 2.6.0-beta.1                                ...           6 years ago
  • 2.5.3                                ...           6 years ago
  • 2.5.2                                ...           6 years ago
  • 2.5.1                                ...           6 years ago
  • 2.5.0                                ...           6 years ago
  • 3.0.0-rc.6                                ...           6 years ago
  • 3.0.0-rc.5                                ...           6 years ago
  • 3.0.0-rc.4                                ...           6 years ago
  • 3.0.0-rc.3                                ...           6 years ago
  • 3.0.0-rc.2                                ...           6 years ago
  • 3.0.0-rc.1                                ...           6 years ago
  • 3.0.0-rc.0                                ...           7 years ago
  • 2.4.4                                ...           7 years ago
  • 2.4.3                                ...           7 years ago
  • 2.4.1                                ...           7 years ago
  • 2.4.0                                ...           7 years ago
  • 2.3.6                                ...           8 years ago
  • 2.3.5                                ...           8 years ago
  • 2.3.4                                ...           8 years ago
  • 2.3.3                                ...           8 years ago
  • 2.3.1                                ...           8 years ago
  • 2.3.0                                ...           8 years ago
  • 2.2.2                                ...           8 years ago
  • 2.2.1                                ...           8 years ago
  • 2.2.0                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.4                                ...           9 years ago
  • 2.0.3                                ...           9 years ago
  • 2.0.2                                ...           9 years ago
  • 2.0.1                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.3.0                                ...           9 years ago
  • 1.2.9                                ...           9 years ago
  • 1.2.8                                ...           9 years ago
  • 1.2.7                                ...           9 years ago
  • 1.2.6                                ...           9 years ago
  • 1.2.5                                ...           9 years ago
  • 1.2.4                                ...           9 years ago
  • 1.2.3                                ...           9 years ago
  • 1.2.2                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.5                                ...           9 years ago
  • 1.0.4                                ...           9 years ago
  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Downloads
Today 0
This Week 0
This Month 30
Last Day 0
Last Week 30
Last Month 0
Dependencies (1)
Dev Dependencies (9)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |