text animations
Morphing Text
Words dissolve into each other through a blur-based SVG filter morph — characters melt and reform rather than sliding or fading, creating a liquid transition between strings.
Installation
Usage
Anatomy
Good to know
- It loops through
textsforever with a blur-and-merge effect. - The morph uses an SVG filter, so it looks best on large, bold headings.
- Screen readers read both overlapping texts, which can be confusing. Add an
aria-labelon a wrapper andaria-hiddenon the component if that matters. - When the user has turned on reduced motion, it shows the first text and does not morph.
Props
How it works — The component uses a
requestAnimationFrameloop that drives two overlapping<span>elements. A SVGfeColorMatrixfilter thresholds the combined blur, making partial overlap appear as a solid glyph rather than a blurred smear. Themorph/cooldowntiming constants are internal and not currently exposed as props.
Examples
Auto-cycling Hero Words
Four short action words cycle on the default timing — "Innovate → Create → Inspire → Deliver". Works best with single words of similar character count.
Tech Stack Card
Stack names morph inside a product card with a slightly smaller font size ([font-size:32pt]). The contained width ensures the text stays within the card boundary.
Hero Section Context
Combined with a static eyebrow and supporting body copy, the morphing headline becomes the visual anchor of a full hero section.