Morphing Text
A dynamic text morphing component for Magic UI.
import { MorphingText } from '@/registry/magicui/morphing-text'
const texts = [ 'Hello', 'Morphing', 'Text', 'Animation', 'React', 'Component', 'Smooth', 'Transition', 'Engaging',]
export function MorphingTextDemo() { return <MorphingText texts={texts} />}Installation
Section titled “Installation”pnpm dlx shadcn@latest add @magicui-solid/morphing-textbunx shadcn@latest add @magicui-solid/morphing-textyarn dlx shadcn@latest add @magicui-solid/morphing-textnpx shadcn@latest add @magicui-solid/morphing-textImport
Section titled “Import”import { MorphingText } from '@/components/magicui/morphing-text'<MorphingText texts={['Hello', 'World']} />| Prop | Type | Default | Description |
|---|---|---|---|
texts |
string[] |
[] |
Array of texts to morph between |
class |
string? |
"" |
Additional classes for the container |
This MorphingText component dynamically transitions between an array of text strings, creating a smooth, engaging visual effect.
Credits
Section titled “Credits”- Credit to @luis-code
Original:
magicui.design/docs/components/morphing-text