FRAMER FORGE
OVERRIDEHover →
Click me
O/280//Interaction

Magnetic Button

Cursor-attracting buttons that lean toward the pointer. Subtle, snappy, satisfying.

cursorhovermagnetbutton
By Kaiborg · Verified author
Pay once · Own forever
D/01//Description
Wraps any button frame with a cursor-magnetic effect — the button leans toward the pointer when nearby, then snaps back on exit. Configurable magnetism strength + return easing. Plays nicely with existing hover states (it composes the transform on top of whatever you have).
P/02//Source preview · locked
import type { ComponentType } from "react"
import { useState, useRef } from "react"
import { motion } from "framer-motion"

export function withMagnetic(Component): ComponentType {
  return (props) => {

// … purchase to unlock the full source
Source locked