Socket
Socket
Sign inDemoInstall

rc-animate

Package Overview
Dependencies
18
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rc-animate

css-transition ui component for react


Version published
Maintainers
3
Install size
2.85 MB
Created

Readme

Source

rc-animate


animate react element easily

NPM version build status Test coverage gemnasium deps node version npm download

Feature

  • support ie8,ie8+,chrome,firefox,safari

install

rc-animate

Usage

import Animate from 'rc-animate';

ReactDOM.render(
  <Animate animation={{ ... }}>
    <p key="1">1</p>
    <p key="2">2</p>
  </Animate>
, mountNode);

API

props

nametypedefaultdescription
componentReact.Element/String'span'wrap dom node or component for children. set to '' if you do not wrap for only one child
componentPropsObject{}extra props that will be passed to component
showPropStringusing prop for show and hide. [demo](http://react-component.github.io/animate/examples/hide-todo.html)
exclusiveBooleanwhether allow only one set of animations(enter and leave) at the same time.
transitionNameString|Objectspecify corresponding css, see ReactCSSTransitionGroup
transitionAppearBooleanfalsewhether support transition appear anim
transitionEnterBooleantruewhether support transition enter anim
transitionLeaveBooleantruewhether support transition leave anim
onEndfunction(key:String, exists:Boolean)trueanimation end callback
animationObject{} 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.

Keywords

FAQs

Last updated on 17 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc