Magnetic
componentA wrapper that pulls its child toward the cursor with spring physics.
Installation
Namespace
npx shadcn@latest add @soultel/magneticURL
npx shadcn@latest add https://asafefe.dev/r/magnetic.jsonDependenciesmotion
Usage
import { Magnetic } from "@/components/magnetic"
export function Example() {
return (
<Magnetic strength={0.5}>
<button>Hover me</button>
</Magnetic>
)
}