Magnetic Button
A responsive button with subtle proximity-based physics that pulls towards the cursor on hover and snaps back on departure.
Loading preview…
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/magnetic-button
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| strength | number | 0.35 | Cursor pull distance multiplier |
| variant | 'primary' | 'secondary' | 'outline' | 'ghost' | 'primary' | Visual surface presentation |
| size | 'sm' | 'md' | 'lg' | 'md' | Button dimensions and typography |
| glow | boolean | true | Enable subtle background glow on hover |