Make your AI a shadcn expert

Elastic Text

Drag a letter and watch it stretch the word like a spring chain, with neighbors following at a geometric falloff and a damped snap-back on release.

Elastic Text preview

Scroll to load preview

Type that behaves like a stretchy chain. Press a letter and drag — that glyph follows your cursor exactly, but every other glyph in the word feels the pull through a spring chain. Direct neighbors track most of the displacement, their neighbors track a fraction, and the ripple decays geometrically until the far ends barely twitch. Release and the whole word snaps home with a slightly underdamped spring, so you get a brief, satisfying oscillation before everything settles. Each letter owns its own Motion useSpring, the master pointer-tracking runs on a single ref-based loop with zero React re-renders, and pointer capture keeps the gesture alive even when you fling past the bounding box. Spaces stay rigid and act as natural breakpoints in the chain. Drop it into a typographic playground, an editorial hero, or a portfolio cover where you want copy that begs to be touched.

Install with AI

If you've connected the shadcn.io MCP server to Claude Code, Cursor, Windsurf, or any MCP-ready AI editor, prompt your agent to install this text effect for you — no copy-paste, no CLI:

use shadcnio to install the elastic-text text effect into my project

FAQ

Was this page helpful?

Sign in to leave feedback.