Skip to content
FreeText

Magnetic Letters

Every letter is pulled toward the cursor by a bouncy spring, tinting and growing as it gets close.

Plan
Free · MIT
Dependencies
React only
Props
8 (8 adjustable)

Free forever

MIT license, for personal and commercial projects. See installation

Magnetic

Made with Furin: Pill Nav · Metal Button · Copy Morph

Props

PropTypeDefaultDescription
childrenstring"Magnetic"The text (line breaks are supported).
sizenumber96Letter size, in px.
radiusnumber170Cursor attraction radius, in px.
strengthnumber0.3How far each letter moves toward the cursor, as a fraction of its size.
stiffnessnumber210Spring stiffness: higher feels twitchier.
idlebooleantrueWhen the cursor is away, an invisible magnet wanders across the text.
colorstring"#E9EBEF"Text color.
accentstring"#7CF5C6"Color the attracted letters tint toward.

Installation

Install it

1Install the package

npm i furin-ui

2Import it

import { MagneticLetters } 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.

Keep exploring

  • Staggered lines that slide up from behind a mask, like a product launch intro.

    Text

  • Words melt into one another with a viscous blur-and-threshold transition and a liquid sheen.

    Text

  • Numbers that roll up to their value.

    Text