Component packs › Kinetic Type › Magnetic Letters

Magnetic Letters

Letters dodge the cursor like iron filings near a magnet, then spring back into a perfect line.

Magnetic Letters is a headline from Kinetic Type, a component pack with 6 components: Headlines that move with meaning. Price: $2 for the whole pack.

Built with: per-letter springs, repel field, accessible label.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Magnetic Letters props

PropTypeDefaultDescription
textstring
sizenumber64Font size in px. Default 64.
radiusnumber120Push radius in px. Default 120.
autoplaybooleanShowcase mode: an invisible cursor sweeps across on a loop.

Methods on the ref

Use it in React

import MagneticLetters from './MagneticLetters';

<MagneticLetters />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Kinetic Type

Good for: Text animation.