Morphing Text
Morphing Text is a React and Tailwind CSS text component from Motion Primitives, licensed MIT. Copy it and paste it into your project.
Motion Primitives
MIT
text
What it is
Morphing Text is a React and Tailwind CSS text component from Motion Primitives, licensed MIT. Copy it and paste it into your project.
How to use it
Open it in the catalogue, press copy, and paste it into your project. The prompt you copy carries the code and the rules that tell your agent to reproduce it without changing anything.
Four free copies a week. No card.
No packages beyond the project baseline
Licence
This component comes from Motion Primitives and is redistributed under the MIT licence, which permits commercial use. The copyright notice travels with the code.
Morphing Text
'use client';
import { useState } from 'react';
import { TextMorph } from '@/components/core/text-morph';
export function TextMorphButton() {
const [text, setText] = useState('Continue');
return (
<button
onClick={() => setText(text === 'Continue' ? 'Confirm' : 'Continue')}
className='flex h-10 w-[120px] shrink-0 items-center justify-center rounded-full bg-black px-4 text-base font-medium text-zinc-50 shadow-xs transition-colors hover:bg-zinc-800 dark:bg-zinc-50 dark:text-black dark:hover:bg-zinc-200'
>
<TextMorph>{text}</TextMorph>
</button>
);
}