Magnetic Button
A button that leans toward the pointer. Transform-only, no layout shift.
Draw
draw a card
$npx shadcn@latest add @clow/magnetic-buttonFirst time? Point @clow at the registry
Once per project, add the registry to your components.json. Then draw any card by name.
"registries": {
"@clow": "https://clow.cards/r/{name}.json"
}Full setup →Playground
props
<MagneticButton>Open the book</MagneticButton>Examples
basic
Props
| prop | type | default |
|---|---|---|
| children | text | Open the book |
| variant | default | glow | outline | soft | default |
| size | sm | md | lg | md |
| strength | number | 10 |
| stiffness | number | 160 |
| axis | both | x | y | both |
| scale | number | 1.02 |
| pad | number | 0 |

