FreeInteraction
Magnet
Wraps a button, card or icon and pulls it toward the cursor with spring physics. Works well on calls to action.
- Plan
- Free · MIT
- Dependencies
- React only
- Props
- 8 (5 adjustable)
Free forever
MIT license, for personal and commercial projects. See installation
Pull me in
Made with Furin: Pill Nav · Metal Button · Copy Morph
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | "" | What gets pulled: a button, a card, an icon, anything. |
strength | number | 0.4 | How close it gets to the cursor: 0 doesn't move, 1 follows it exactly. |
radius | number | 140 | Distance in px, measured from the element's edge, at which the pull starts. |
stiffness | number | 170 | Spring stiffness: higher responds faster. |
damping | number | 11 | Spring damping: lower bounces more when returning. |
disabled | boolean | false | Turns the pull off (the element stays still). |
className | string | "" | Extra CSS class for the container. |
style | CSSProperties | "{}" | Inline styles for the container. |
Installation
Install it
1Install the package
npm i furin-ui2Import it
import { Magnet } from "furin-ui";Also with pnpm add furin-ui, yarn add furin-ui or bun add furin-ui. Each component ships its own CSS and imports it for you.
Dependencies
- React
- 18 or later
- Other libraries
- none
- License
- MIT
Each file ships its own CSS: there's nothing else to install.