Magnetic Button
Interactive button with magnetic hover effect that follows cursor movement, creating an engaging user experience with customizable attraction strength and spring physics
Pro features
What the Pro version adds to this component.
Proximity Magnetic Field
Button attracts cursor from distance with document-level tracking - works even before hovering
Advanced Cursor Tracking
Real-time cursor position tracking with smooth interpolation and distance-based strength
Spring Physics
Realistic spring animations with customizable stiffness and damping, optimized for performance
Customizable Glow Effects
Variant-specific glow effects with adjustable intensity for stunning hover states
Ripple Click Animation
Material Design inspired ripple effect on click for tactile feedback
Multiple Variants
7 visual variants including gradient, each with unique glow effects
3D Rotation & Scale
Subtle 3D rotation and dynamic scale effects based on cursor position
Performance Optimized
Smart animation loop management - stops when idle to save CPU resources
Production Ready
Battle-tested with proper event handling, cleanup, and accessibility support
Installation
Install via CLI
npx @moontra/moonui-cli add magnetic-buttonUsage
Examples
Quantum Computing Interface
Futuristic magnetic buttons for quantum computing operations with particle effects
AI Neural Network Dashboard
Intelligent magnetic controls for neural network training and optimization
Blockchain Technology
Secure magnetic buttons for blockchain transactions and smart contracts
Space Exploration
Zero-gravity magnetic interactions for space mission control systems
Cybersecurity
Protected magnetic controls for security operations and threat detection
Data Analytics
Interactive magnetic buttons for data visualization and analysis dashboards