Skip to content
English
Morphing text comes with Pro. Its preview shows once you unlock it.

How it works

All words are stacked invisibly in one grid cell, so the box takes the width of the longest and nothing around it moves. On each change the outgoing word blurs and fades while the incoming one sharpens out of the same place, both on one ease-in-out. In liquid mode an SVG alpha threshold is applied to the two words only while they overlap, so their blurred shapes fuse and pull apart like ink in water; before and after, the filter is off and the text is perfectly crisp. The blur mode adds a slight vertical drift instead. The cycle is a pausable timer, so it stops with the page.

Use it for

  • One changing word at the end of a hero headline.
  • Short taglines that list qualities, audiences or use cases.

Look elsewhere when

  • Information people must read, such as status or prices.
  • Long words in narrow layouts: the box reserves the longest word's width.

Usage

import { MorphingText } from './MorphingText.jsx'

export function Hero() {
  return (
    <h1>
      Interfaces that feel{' '}
      <MorphingText words={['calm', 'precise', 'alive', 'yours']} srText="calm, precise, alive and yours" mode="gooey" />
    </h1>
  )
}

Props

PropTypeDefaultWhat it does
wordsstring[]—Words to cycle through.
mode'gooey' | 'blur''gooey'Liquid fusion with an SVG alpha threshold, or a soft blur crossfade.
intervalnumber2600Time each word stays, in ms (at least the morph + 400).
morphDurationnumber900Length of each morph in ms.
pausedbooleanfalseStops the cycle and resumes with the time left.
srTextstring—What screen readers read once instead of the cycling word. Defaults to the words joined by commas.
align'start' | 'center''start'Alignment of shorter words inside the reserved width.
asElementType'span'Element to render.

Accessibility

  • Screen readers read srText once (by default all words, comma separated); the cycling stage is aria-hidden, so nothing is announced repeatedly.
  • The cycle pauses through the paused prop; give users a pause control when it runs for longer than five seconds alongside other content.
  • Between morphs no filter is applied, so the resting word is crisp at full contrast.
  • Reduced motion replaces the blur and threshold with a 300ms fade.

Motion

Each morph takes 900ms (adjustable) on an ease-in-out; words rest for the remainder of the 2.6s interval. Liquid mode blurs to 10px under the threshold; blur mode to 6px with a 0.12em drift.

Add it to your project

Pro members copy a prompt and their coding agent installs the source, the same way as the free components.

MorphingText.jsxmorphing-text.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Text motion
Scramble text comes with Pro. Its preview shows once you unlock it.