Skip to main content
← Back to Components

Buttons

Interactive button components with magnetic effects and smooth animations

Interactive Button

Interactive buttons with subtle cursor tracking effect and smooth spring animations.

Preview

Installation

app/page.tsxtsx
import { InteractiveButton } from "@/components/ui/interactive-button";

export default function Example() {
  return (
    <div className="flex gap-4">
      <InteractiveButton variant="accent">
        Accent
      </InteractiveButton>
      
      <InteractiveButton variant="secondary">
        Secondary
      </InteractiveButton>
      
      <InteractiveButton variant="glass">
        Glass
      </InteractiveButton>
      
      <InteractiveButton variant="default">
        Default
      </InteractiveButton>
      
      <InteractiveButton variant="ghost">
        Ghost
      </InteractiveButton>
    </div>
  );
}

Props

NameTypeDefaultDescription
variant"default" | "accent" | "secondary" | "glass" | "ghost""default"Visual style variant
size"sm" | "md" | "lg""md"Button size
magneticStrengthnumber0.3Strength of magnetic effect
disabledbooleanfalseDisabled state