Make your AI a shadcn expert

Magnetic Button

Button that magnetically follows the cursor with spring physics for React, Next.js, shadcn/ui, Tailwind CSS, TypeScript. Built on the base-ui shadcn Button.

Magnetic Button preview

Scroll to load preview

A subtle, satisfying CTA. As your cursor moves across the button it gently follows, then springs back when you leave. The pull is quiet enough for serious products yet rewarding enough to make users hover again. Perfect for hero CTAs, primary actions on landing pages, or anywhere you want a touch of motion without distraction. Built on top of the shadcn Button so every variant and size you already use just works.

Install with AI

If you've connected the shadcn.io MCP server to Claude Code, Cursor, Windsurf, or any MCP-ready AI editor, prompt your agent to install this button for you — no copy-paste, no CLI:

use shadcnio to install the magnetic-button button into my project

FAQ

Last updated on May 25, 2026

Was this page helpful?

Sign in to leave feedback.