Magnetic Button

PRO

Interactive button with magnetic hover effect that follows cursor movement, creating an engaging user experience with customizable attraction strength and spring physics.

Pro Features

Unlock advanced capabilities with the Pro version

Magnetic Attraction

Button follows cursor movement within range for engaging interaction

Cursor Tracking

Real-time cursor position tracking with smooth interpolation

Spring Physics

Realistic spring animations with customizable stiffness and damping

Adjustable Range

Define the magnetic field range for precise control

Variable Strength

Fine-tune attraction strength from subtle to strong

3D Perspective

Subtle 3D rotation effect for depth perception

Glow Effect

Dynamic glow that responds to hover state

Production Ready

Optimized performance with proper event handling

Installation

Install via CLI

moonui add magnetic-button

Usage

Pro Required

Examples

Basic Magnetic Button

PRO

Default magnetic button with standard settings

Pro Required

Strength Variations

PRO

Different magnetic attraction strengths

Pro Required

Subtle movement

Balanced effect

Strong attraction

Range Variations

PRO

Different effect ranges for magnetic attraction

Pro Required

Close proximity

Standard distance

Wide attraction area

Radius Variations

PRO

Different border radius options for visual variety

Pro Required

Interactive Demo

PRO

Adjust all parameters in real-time

Pro Required

Spring Configurations

PRO

Different spring physics for varied feel

Pro Required

Smooth & fluid

Default behavior

Quick & snappy

Multiple Buttons

PRO

Multiple magnetic buttons with different settings

Pro Required

Real-world Use Cases

PRO

Practical examples in social media and e-commerce

Pro Required

Social Media Actions

Interactive buttons for engagement

E-commerce Actions

Shopping interactions