Components / Interactionsv1.0.0 · updated 2026-10-04
Magnetic Button
Premium · $19Wrap a button, link or icon and it drifts toward the cursor when it comes within range, then springs home. Strength, radius and smoothing are tunable, and it runs on the shared loop instead of its own requestAnimationFrame.
cursorbuttonhover
Bring the pointer within 80px
Customize
Accent
Install
No dependencies beyond React. Copy the file and import it.
- Download the package from your library after purchase and add it to your project.
- Make sure the Brazen tokens are loaded (
tokens.css); colours and timing come from them. - Import it and pass the props below.
Props 3
| Prop | Type | Default | Description |
|---|---|---|---|
strength | number | 0.35 | How far it follows, 0–1. |
radius | number | 80 | Pull distance beyond the element edge, in px. |
smoothing | number | 0.18 | Per-frame lerp factor; lower is floatier. |
Features
- Strength, radius and smoothing
- Works on any child
- Pauses off-screen
- Skipped on touch screens
Dependencies
react@>=19peer
Works with
- React 19
- Next.js 15+
- TypeScript
Reduced motion
Stays still.