Components / effect
Magnet Cursor
A ring that follows the pointer, then snaps around any link or button it reaches, matching its size and corners.

Implementation
A ring that follows the pointer, then snaps around any link or button it reaches, matching its size and corners.
- Framework
- React 19.3.1 with TypeScript
- Motion
- Native CSS and browser APIs. No GSAP required.
- Available modes
- build
- Version
- 1.0.0 · published
Source code
Loading source…
Quality evidence
Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .
Changelog
v1.0.0 · A ring that follows the pointer, then snaps around any link or button it reaches, matching its size and corners.
Frequently asked questions
How does the ring know the size of an element?
It measures the element under the pointer each time the pointer moves, so it stays correct when the layout changes.
What happens when the pointer leaves the element?
The ring is released and continues from where it was, easing back to the pointer.