Dev Design Library

Magnet

Wrapper that pulls its child toward the mouse cursor while the pointer is within a padding distance, and lets it return when the pointer leaves.

Magnet preview
Library
React Bits
Framework
React
Type
component
License
Commons-Clause+MIT
Install
npx shadcn@latest add @react-bits/Magnet
Files
  • src/content/Animations/Magnet/Magnet.jsx
Source
https://github.com/DavidHDev/react-bits

Categories

More from React Bits