Magnetic Button

Magnetic Button from the Buttons group of Depth UI.

Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.

MagneticButton props

PropTypeDefaultDescription
childrenReactNodeButton label or content.
strengthnumber0.4How far the button follows the pointer (0 to 1).
reachnumber28Extra hit area around the button, in px.

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks