Per-character layout morphing for labels, counters, and live text swaps, powered by Motion. React component.
Made by AxylPer-character layout morph between two labels — click the preview button to trigger a swap.
TextMorph driven by a live input field — type to see characters morph in real time.
Cycle copy on click:
Live morph while typing:
| Prop | Type | Default |
|---|---|---|
children? | string | - |
as? | ElementType | "p" |
variant? | "blur" | "slide" | - |
staggerDelay? | number | 0 |
skipUnchanged? | boolean | false |
charClassName? | string | - |
live? | "off" | "polite" | "assertive" | "off" |
variants? | Variants | - |
transition? | Transition | - |
className? | string | - |
Use TextMorph for label swaps that need to feel fluid rather than abrupt: copy buttons toggling "Copy" → "Copied", tab selectors, status badges, or counters where a hard cut feels jarring. It is most effective on short text (1–15 characters) where individual character transitions are clearly visible.
For longer text or entire paragraphs that change, a fade transition is simpler and more legible.
Set live="polite" when the content change is the result of a user action that screen reader users should be notified about (e.g., "Copied"). Use live="assertive" only for urgent status updates. The morphing animation is visual only; the final string is announced by the live region after the transition completes. When prefers-reduced-motion: reduce is set, the component skips the character-by-character morph via useReducedMotion() and renders the text directly — no extra configuration needed.
Inspired by motion-primitives.
Text Scramble
A text scramble reveal animation that decodes characters on mount or when re-triggered, powered by Motion. React.
Text Roll
A per-character vertical text roll animation for label swaps and micro-interactions, powered by Motion. React.
Built by Axyl. A motion-first component registry for React.
Last updated: 9/14/2026
Help keep SoraLabs moving.
Every contribution helps us build and maintain open-source tools for the community.
Sponsor on GitHub