Magnetic
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardMagnetic(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/card-magneticAbout this component
Card layers move toward the cursor at different strengths (the orb the most, the backdrop at 30%, the text at 15%), creating a parallax depth illusion without any 3D rotation or perspective.
Triggers
- Hover
- Mouse tracking
Techniques
- Transform only
- Mouse tracking
Difficulty
Intermediate
Accessibility
Reduced motion
Mouse-tracking transforms skipped under prefers-reduced-motion; card stays static.
Use it in anything you build, commercial and client work included. Licence