Components / Text
Morphing Text
Words that melt into each other with a liquid, gooey morph.
Design, Animate, Ship, Repeat
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
None. This component only needs React and Tailwind.
- 2
Add the component
Copy the code from the Code tab above into
components/ui/morphing-text.tsx. - 3
Use it
example.tsximport { MorphingText } from "@/components/ui/morphing-text"; export default function MorphingTextDemo() { return ( <MorphingText words={["Design", "Animate", "Ship", "Repeat"]} className="max-w-md text-5xl text-zinc-900 sm:text-6xl dark:text-white" /> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| words | string[] | — | Words to morph between (2 or more). |
| morphTime | number | 1 | Seconds per morph. |
| holdTime | number | 1.6 | Seconds each word holds. |
| className | string | — | Set font size and color here. |