Installation
npx shadcn@latest add @iconiq/text-inertiaProps
TextInertia
Pointer-reactive word treatment that tracks local cursor velocity, applies that momentum to the hovered word, and springs the word back into place.
textstringDefault "Interfaces remember momentum"
intensitynumberDefault 1
classNamestringwordClassNamestringThe component forwards standard div props except children; the rendered words always come from the text prop.
The root receives an aria-label with the full text, while individual animated word spans are hidden from assistive technology.
Pointer velocity behavior
Text Inertia uses Motion values and spring animations instead of a runtime DOM-splitting animation plugin.
Pointer movement over the root records x/y velocity, and entering a word maps that velocity to x, y, and rotation offsets.
Each word immediately settles back to x=0, y=0, and rotate=0 with a spring, which creates the inertial feel with only Motion.
The text is split with React during render, so there is no document query or third-party DOM splitting step.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: motion.