Magnetic Button
A button that is pulled toward the cursor and springs back on leave. The label moves a little further for a sense of depth.
Import
import { MagneticButton } from "@igorao79/uivix";Examples
Default
Bring the cursor close to the buttons
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| strength | number | 0.4 | How strongly the button follows the cursor (0..1) |
| range | number | 40 | Extra distance around the button where the pull starts |
| ...props | ButtonHTMLAttributes | - | Any native button props |