gsap-react-plugin

1.0.2 • Public • Published

GSAP React Plugin

A GSAP plugin for tweening React.js component state.

This plugin will handle tweening values on a prop called state. If the tween target does not have a setState method, the plugin will not initialize.

Usage

React.createClass({
    getInitialState: function() {
        return {width: 0};
    },
    componentDidMount: function() {
        TweenLite.to(this, 1, {state: {width: 100}});
    },
    render: function() {
        return <div style={{width: this.state.width}}>Hello World!</div>
    }
});

Installation

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    4
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i gsap-react-plugin

Weekly Downloads

4

Version

1.0.2

License

MIT

Last publish

Collaborators

  • lettertwo