made css3 transform super easy
http://alloyteam.github.io/AlloyTouch/transformjs/
You can install it via npm:
npm install css3transform-react
- https://alloyteam.github.io/AlloyTouch/transformjs/react/example/
- http://alloyteam.github.io/AlloyTouch/transformjs/example/stars.html
//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>
);
}
This content is released under the MIT License.