React.js - Tilt.js
React version of tilt.js
Demo
https://vx-demo.now.sh/gallery
Install
- yarn:
yarn add react-tilt
- npm:
npm install --save react-tilt
Usage
import Tilt from 'react-tilt'
<Tilt className="Tilt" options={{ max : 25 }} style={{ height: 250, width: 250 }} >
<div className="Tilt-inner"> 👽 </div>
</Tilt>
Options
{
reverse: false,
max: 35,
perspective: 1000,
scale: 1,
speed: 300,
transition: true,
axis: null,
reset: true
easing: "cubic-bezier(.03,.98,.52,.99)",
}
API
Property | Signature |
---|
onMouseEnter | () -> SyntheticEvent |
onMouseMove | () -> SyntheticEvent |
onMouseLeave | () -> SyntheticEvent |
options | Object |
Roadmap
Alternatives