Morphing Text
Cycles through words with a gooey blur and threshold morph, paused off screen and static under reduced motion.
pnpm dlx @glinui/cli@latest add morphing-textYour workspace is
Installation
pnpm dlx @glinui/cli@latest add morphing-textCredits. Adapted from Magic UI (MIT, (c) Magic UI). Per instance SVG filter id, off screen pause, reduced motion levels, an accessible word list and token colors. Attribution details.
Prefer the package?
Usage
Improvements: the SVG filter id is unique per instance (the original used a global id that collides), the loop pauses off screen, large frame gaps are clamped, text size is container relative with clamp, and initial markup is the first text, readable before JS runs.
Difference from Word Rotate: Morphing Text is a blur and threshold gooey crossfade in place, Word Rotate swaps words with a vertical slide.
Engines: the `engine` prop is not applicable. Continuous glyph cross-fade driven by a css filter loop; an engine adds nothing.
Slower timing
Longer morph and rest times, smaller text via className.
import { MorphingText } from "@glinui/ui"
export function Demo() { return ( <MorphingText texts={["Calm", "Clear", "Considered"]} morphTime={2.4} cooldownTime={1.2} className="text-[var(--color-accent)]" /> )}Accessibility
- All texts are exposed once in a screen reader only span, so the animation never spams a live region.
- The visual layer is aria-hidden.
- The loop pauses while the component is off screen and in background tabs.
ARIA Attributes
- `aria-hidden` on the visual layer
- all texts joined in an `sr-only` span
Reduced Motion
Motion level none (or prefers-reduced-motion) shows the first text and runs no loop. Level subtle swaps texts with a plain opacity crossfade, no blur and no filter.
Affected properties
blurSVG threshold filteropacityAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
texts | string[] | Yes | - | Words or phrases to cycle through. Required. |
morphTime | number | No | 1.5 | Seconds each morph takes. |
cooldownTime | number | No | 0.5 | Seconds each text rests before the next morph. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { MorphingText } from "@glinui/ui"Dependencies
@glinui/ui@glinui/motionGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/morphing-text.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
MorphingTextProps
MorphingTextProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
cooldownTime | number | No | 0.5 | Seconds each text rests before the next morph. |
morphTime | number | No | 1.5 | Seconds a morph takes. |
texts | string[] | Yes | - | Words or phrases to cycle through. |