purnavu-12

Magnetic Button

Buttons 2

About

A spring-loaded button that gently follows your pointer. Source: BuildWithMe UI. Original attribution and MIT notices are included with the component.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Magnetic Button to your project and fits it to your theme.

Code

How Magnetic Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Component from "@/components/ui/buildwithme-magnetic-button";

export default function Demo() {
  return (
    <div data-bwm-theme="dark" className="flex min-h-screen w-full items-center justify-center bg-[#050505] px-6">
      <div className="w-full max-w-[760px]">
        <Component />
      </div>
    </div>
  );
}

Dependencies

More by purnavu-12

View all
  • Border-Trace Button

    Border-Trace Button

    11
  • Flowing Lines

    Flowing Lines

    8
  • Streaming Message

    Streaming Message

    8
  • Breadcrumb Trail

    Breadcrumb Trail

  • Floating Label Field

    Floating Label Field

  • Adaptive Sidebar

    Adaptive Sidebar

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    6
  • Button

    Button

    14
  • Button Group

    Button Group

    37
  • Button

    Button

    32
  • Split Button

    Split Button

    32