Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.23 KB

README.md

File metadata and controls

51 lines (39 loc) · 1.23 KB

transformjs

made css3 transform super easy

Home

http://alloyteam.github.io/AlloyTouch/transformjs/

Install

You can install it via npm:

npm install css3transform-react

Demo

Usage

//set "translateX", "translateY", "translateZ", "scaleX", "scaleY", "scaleZ", "rotateX", "rotateY", "rotateZ", "skewX", "skewY", "originX", "originY", "originZ"
render() {
    return (
        <Transform
          translateX={100}
          scaleX={0.5}
          originX={0.5}>
          <div>sth</div>
        </Transform>
    );
}

// you can also use other porps, such as "className" or "style"
render() {
    return (
        <Transform
          translateX={100}
          className="ani"
          style={{width: '100px', background: 'red'}}
          <div>sth</div>
        </Transform>
    );
}

License

This content is released under the MIT License.