JSPM

  • Created
  • Published
  • Downloads 32146
  • Score
    100M100P100Q159680F

tween-one anim component for react

Package Exports

  • rc-tween-one
  • rc-tween-one/lib/TimeLine
  • rc-tween-one/lib/TweenOne

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-tween-one) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rc-tween-one


React TweenOne Component

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

Browser Support

IE Chrome Firefox Opera Safari
IE 8+ ✔ Chrome 31.0+ ✔ Firefox 31.0+ ✔ Opera 30.0+ ✔ Safari 7.0+ ✔

Development

npm install
npm start

Example

http://localhost:8100/examples/

http://react-component.github.io/tween-one/

install

rc-tween-one

Usage

var TweenOne = require('rc-tween-one');
var React = require('react');
React.render(<TweenOne animation={{x:100}}>
               demo
             </TweenOne>, container);

API

props

name type default description
animation object / array null animate configure parameters
paused boolean false animate pause
reverse boolean false animate revers
onChange func null when the animation change called, callback({ moment, item, tween, index, mode})
moment number null set the current frame
component string div component tag

animation = { }

transform need to set the initial value, must be set in the style;

name type default description
type string to play type: to from
in style string / number null CSS style value: translateX rotateX color marginTop or gsap: x y...
duration number 450 animate duration
delay number 0 animate delay
repeat number 0 animate repeat, To repeat indefinitely, use -1
repeatDelay number 0 repeat start delay
yoyo boolean false if true, every other repeat cycle will run in the opposite direction so that the tween appears to go back and forth (forward then backward).
ease string easeInOutQuad animate ease
bezier object null bezier curve animate
onStart func null A function that should be called when the tween begins
onUpdate func null A function that should be called every time the animate updates
onComplete func null A function that should be called when the animate has completed
onRepeat func null A function that should be called each time the animate repeats

animation =[ ] is timeline

bezier = { }

name type default description
type string soft thru, soft, quadratic, cubic
autoRotate boolean false to automatically rotate the target according to its position on the Bezier path
vars array null bezier point data,as: {x:100,y:100}

bezier API refer to gsap BezierPlugin