Text morphPro
A label morphing into its next state letter by letter: letters matched by character and occurrence stay, new ones stagger in from a blur, removed ones fade out.
oxyn add text-morphThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- A label that morphs into its next state letter by letter: letters are matched by character and occurrence (morph_letters), so shared letters stay, new letters stagger in 22 ms apart from a blur and removed letters fade out above.
When not to use
- An agent asks before it acts: use Approval Card instead.
- Several open requests in one card: use Approval pager instead.
- An agent's question in its own card above the composer: use Decision Card instead.
Installation
Text morph is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add text-morphUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Follow
Follow → Following: six letters stay.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Copy
Copy → Copied → Done.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Manual
Step by hand.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
TextMorph
| Prop | Type | Default | Description |
|---|---|---|---|
textrequired | String | — | The label. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| — | Not interactive (the button belongs to the demo) |
Accessibility
- The label is the accessible name; letter spans are aria-hidden.
From the spec
- The label is the accessible name; letters are aria-hidden.
Motion & interaction
Timing
- Reduced motion: no rise, blur or stagger; labels and values swap instantly (slot reels land at once, the shimmer band stops and the text stays muted).
Responsive behaviour
- Inline; never wraps.
Edge cases (spec)
- Never wraps.
Notes for AI
- Import
TextMorphfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - There is no GPUI version yet; use the Dioxus component.
- Props to set first:
text. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.