Tone switch
Toggle between two phrases. Watch the shared characters stay put while only the differing parts change.
const [tone, setTone] = useState<'casual' | 'formal'>('casual');
const lines = {
casual: "Hey, glad you're here.",
formal: "Welcome, we're delighted to see you.",
};
<TextMorph value={lines[tone]} />