Magnetic

New

Leans toward the pointer, with its label leaning further

$ npx @hritik-sharmaa/repeat-ui add button-magnetic
Category
Button
Added
Nov 1, 2026
Version
1.0.0
Packages
motion
Flavors
TS · JS · Tailwind · CSS
Live preview
Customize
0.35
999px
import ButtonMagnetic from "@/components/repeat-ui/button-magnetic/preview";

<ButtonMagnetic>Get started →</ButtonMagnetic>

Installation

  1. Run the command

    Adds the files and installs any packages they need. Works with npm, pnpm, yarn and bun.

    $ npx @hritik-sharmaa/repeat-ui add button-magnetic --variant ts-tailwind
  2. Use it

    The files are in components/repeat-ui/button-magnetic/.

    import ButtonMagnetic from "@/components/repeat-ui/button-magnetic/preview";
    
    export default function Page() {
      return <ButtonMagnetic />;
    }

Props

PropTypeDefaultDescriptionOptions
childrenReactNode-The button label.-
size"sm" | "md" | "lg""md"Height, padding and font size. Every Repeat UI button shares this scale.sm | md | lg
strengthnumber0.35How hard the pointer pulls, from 0 (not at all) to 1.-
colorstring"#fafafa"Button colour.-
textColorstring"#0a0a0a"Text colour.-
radiusnumber999Corner radius in pixels.-
onClick(event: MouseEvent) => void-Click event handler.-
classNamestring""Extra classes for the button.-

More button

See all