crucıble

Magnetize

Variable-font text where each glyph swells in weight and gains a faint white glow as the cursor nears, under a steep gaussian falloff. Static mid-weight on touch and under reduced motion.

motionpro

Installation

CLI

npx shadcn@latest add @crucible/magnetize

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
childrenstringThe text. Server-renders as plain text; the effect attaches after hydration.
radiusnumber140Proximity radius in px within which glyphs respond to the cursor.
falloffnumber2Steepness of the gaussian falloff. Higher = tighter, more physical field.
fromFontVariationSettingsstring"'wght' 400"Resting font-variation-settings, e.g. "'wght' 400" or "'wght' 400, 'wdth' 100". The axes named here (unioned with toFontVariationSettings) are the axes driven.
toFontVariationSettingsstring"'wght' 900"Font-variation-settings a glyph reaches at zero cursor distance.
glowbooleantrueFaint emissive text-shadow on near glyphs as the cursor approaches.
glowColorstringsoft whiteGlow color.
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"span">, "children">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.