Magnetic
A button that leans toward the pointer.
Move the pointer near the button.
Installation
pnpm add @heyramzi/uiUsage
import { magnetic } from "@heyramzi/ui/effects/magnetic";<button use:magnetic={{ intensity: 0.5, range: 130 }}>Book a call</button>Keyboard and accessibility
- The pull follows the pointer only. Keyboard focus doesn't move the element.
- With reduced motion on, there's no pull at all.