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
import{tilt,glare,useResonate,ResonateContainer}from"@resonatejs/react";exportconstCard: React.FC=()=>{consttrackers=useResonate({presets: [glare(),tilt(), ...]// all your presets go here});return(<ResonateContainerclassName="..."trackers={trackers}>
Try it out!
</ResonateContainer>);}
Listeners
import{useResonate,ResonateContainer}from"@resonatejs/react";exportconstCard: React.FC=()=>{consttrackers=useResonate({// access the rich APIlisteners: ({ getCenterPosition })=>{const{ x, y }=getCenterPosition();// return all the event listenersreturn{mousemove({ clientX, clientY }){console.log(clientX-x,clientY-y);},};},});return(<ResonateContainerclassName="h-full w-full py-24 text-zinc-300 ring-2 ring-zinc-600 text-center text-7xl text-wrap rounded-xl font-mono bg-zinc-900"trackers={trackers}>
Try it out!
</ResonateContainer>);};