This component is truly fascinating. The reason is that it employs something known as "trigger" frames within the button to identify the cursor's position. Then, it adjusts the background element and text accordingly to mimic the magnetic effect.
Step / 01
Remix this project.
Step / 02
See how such interaction is structured.
Step / 03
Try recreating it for a fun practice session.
Step / 04
Copy and paste it into your own projects.