cnippet/ui
  1. motion
  2. text animations
  3. morphing text

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 texts forever 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-label on a wrapper and aria-hidden on 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 requestAnimationFrame loop that drives two overlapping <span> elements. A SVG feColorMatrix filter thresholds the combined blur, making partial overlap appear as a solid glyph rather than a blurred smear. The morph / cooldown timing 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.