A fluid typography transition that blends blurred word silhouettes through an SVG alpha threshold, then releases the filter for a perfectly crisp resting state.
pnpm dlx shadcn@latest add @componentry/text-morphimport { TextMorph } from "@/components/ui/text-morph"
<TextMorph
words={["IMAGINE", "REFINE", "RELEASE"]}
interval={2400}
morphDuration={680}
subtext="From idea to impact"
/>| Property | Type | Default |
|---|---|---|
wordsWords or phrases displayed by the morph sequence. | string[] | ["IMAGINE", "REFINE", "RELEASE"] |
intervalTime each word rests before the next morph begins, in milliseconds. | number | 2600 |
morphDurationDuration of the fluid morph in milliseconds. | number | 680 |
blurMaximum blur used to merge the two silhouettes. | number | 12 |
thresholdAlpha contrast applied by the SVG threshold filter. | number | 18 |
subtextOptional supporting text shown below the morph. | string | — |
fontSizeCSS font-size value for the morphing text. | string | "clamp(3rem, 14vw, 9rem)" |
fontFamilyFont family for the morph and subtext. No remote font is loaded. | string | "inherit" |
fontWeightCSS font weight for the morphing text. | CSSProperties["fontWeight"] | 700 |
alignHorizontal alignment of the text and supporting copy. | "left" | "center" | "right" | "center" |
animateWidthSmoothly interpolate width between differently sized words. | boolean | true |
loopContinue cycling through the supplied words. | boolean | true |
pauseOnHoverPause the next cycle while hovered or focused. | boolean | true |
classNameAdditional classes applied to the root wrapper. | string | — |
textClassNameAdditional classes applied to the morphing text stage. | string | — |
subtextClassNameAdditional classes applied to the supporting text. | string | — |
onMorphStartCalled immediately before a morph begins. | (nextWord: string, nextIndex: number) => void | — |
onMorphCompleteCalled after the next word becomes crisp and stable. | (word: string, index: number) => void | — |
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.