184 Components

Magnetic Scatter Text

Text

Anti-gravity typography where characters scatter elastically away from cursor proximity, then snap back with Hooke's Law spring harmonics.

MAGNETIC SCATTER

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:framer-motionclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/magnetic-scatter-text.json"

Props

TypeScript props supported by <MagneticScatterText />.

3 props
PropTypeDefaultDescription
textstring—Text phrase to animate with repulsion physics.
radiusnumber100Repulsion influence radius in pixels around pointer.
strengthnumber40Force multiplier pushing letters away.

Key Features

  • Vector angle repulsion calculating exact cursor Euclidean distance per letter.
  • Hooke's Law recoil springs returning glyphs to their structural baseline.
  • Customizable dispersion radius and kinetic repulsion strength.
  • Prefe-reduced-motion compatibility.

Keyboard & Accessibility

  • Underlying string remains continuous in DOM.
  • Disabled physics displacement when reduced motion is preferred.