Skip to content
Marcus Vinicius
(04)Components

Magnetic

Wraps any element and pulls it toward the cursor with an elastic spring back. Disabled automatically on touch devices and for reduced motion.
Move closerLoading

Props

Install

npm i gsap @gsap/react

Usage

<Magnetic strength={0.4}>
  <button>Magnetic</button>
</Magnetic>