Component packs › Hover FX › Magnetic Button
The button pulls toward your cursor before you reach it; the label travels further than the body.
Magnetic Button is a button from Hover FX, a component pack with 6 components: The fastest way to make a site feel premium. Price: $2 for the whole pack.
Built with: pull radius, label parallax, pointer light.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | ||
radius | number | 90 | Pull radius around the button in px. Default 90. |
onClick | () => void | ||
autoplay | boolean | Showcase mode: an invisible cursor orbits it. |
destroy(): voidimport MagneticButton from './MagneticButton';
<MagneticButton />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Micro-interactions.