Set an animation size as relative to an element

Im trying to do a mouse hover that the cursor “transforms” in the button, image for example:

I Already achieved this, but manually for each div, i want make this automatically.

Also, i want to do a magnetic cursor, but only find with a lot of JS.


Here is my public share link: [LINK]