Skip to content

feat: add magnetic button component#984

Open
Tonoy3951573 wants to merge 2 commits into
magicuidesign:mainfrom
Tonoy3951573:Magnet-Button-branch
Open

feat: add magnetic button component#984
Tonoy3951573 wants to merge 2 commits into
magicuidesign:mainfrom
Tonoy3951573:Magnet-Button-branch

Conversation

@Tonoy3951573

Copy link
Copy Markdown

Description

Adds a new MagneticButton component to the Magic UI registry. The component provides a smooth magnetic hover interaction using Motion for React, with customizable magnetic strength and spring animation while remaining fully compatible with native button props.

Changes

  • Added MagneticButton component.
  • Added interactive demo (magnetic-button-demo).
  • Added component documentation.
  • Registered the component in the Magic UI registry.
  • Added support for configurable magneticStrength and spring properties.
  • Built with motion/react using useMotionValue and useSpring for smooth, performant animations.

Motivation

Modern landing pages and portfolios frequently use magnetic hover interactions to create a more engaging user experience. This component offers a reusable, customizable implementation that integrates seamlessly with the existing Magic UI component library.

Breaking Changes

None.

Screenshots

Screencast.from.2026-07-08.01-15-49.mp4

Device / Browser / Viewport:

Ubuntu 24.04 • Microsoft Edge 149 • 1920×1080

(New Component)

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@Tonoy3951573 is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant