Magnetic button
The button follows your mouse a little and the arrow nudges forward.
Desktop onlyUsed in production
Install
npx finepieces add magnetic-buttonOr with the shadcn CLI ›
npx shadcn@latest add https://finepieces.net/r/magnetic-button.jsonMove over the button
example.tsx
import { MagneticButton } from "@/components/fine-pieces/magnetic-button";
export default function Example() {
return (
<div className="flex h-full min-h-[360px] flex-wrap items-center justify-center gap-4">
<MagneticButton href="#">Start a project</MagneticButton>
<MagneticButton href="#" variant="outline">See the work</MagneticButton>
</div>
);
}