Custom cursor snaps to button

An interesting interaction that i haven’t seen talked or showed yet with webflow.

I am wondering if anyone has an idea how to create this. Is there a way to dictate that the custom cursor snaps to a certain element centered or to edges on mouse hover ?.

Image from Gyazo