For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
Shadcn Labs/

Text Morph

Text that morphs between strings: shared letters glide into place while the rest blur in and out. A React component built on View Transitions, installed with the shadcn CLI.

transition

Installation

$ pnpm dlx shadcn@latest add @transition-kit/text-morph

Usage

import { TextMorph } from "@/components/transitions/text-morph";
<TextMorph>{copied ? "Copied!" : "Copy link"}</TextMorph>

Change the text with a plain setState; TextMorph starts the transition itself. Letters are matched by character and occurrence, so the ts in "transition" and "station" glide to their new spots while the others fade.

API Reference

TextMorph

PropTypeDefaultDescription
childrenstring-The text to show. Each change morphs from the previous string.

Screen readers get the full string; the animated letters are hidden from them.