You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pnpm add react-tilt react react-dom
# or
npm install react-tilt react react-dom
# or
yarn add react-tilt react react-dom
Usage
import{Tilt}from'react-tilt'constdefaultOptions={reverse: false,// reverse the tilt directionmax: 35,// max tilt rotation (degrees)perspective: 1000,// Transform perspective, the lower the more extreme the tilt gets.scale: 1.1,// 2 = 200%, 1.5 = 150%, etc..speed: 1000,// Speed of the enter/exit transitiontransition: true,// Set a transition on enter/exit.axis: null,// What axis should be disabled. Can be X or Y.reset: true,// If the tilt effect has to be reset on exit.easing: "cubic-bezier(.03,.98,.52,.99)",// Easing on enter/exit.}constApp=()=>{return(<Tiltoptions={defaultOptions}style={{height: 250,width: 250}}><div>馃懡</div></Tilt>)}