TX-02Texts
Dynamic Text
Morphing text where shared letters travel, old ones fall and new ones land, with decode and cycle modes.
PROKinetic Type Hero and more like it are in Kokonut UI Pro
Installation
Dynamic Text is a free, open-source React component in the Kokonut UI Texts collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/dynamic-text.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/dynamic-textUsage
import DynamicText from "@/components/kokonutui/dynamic-text";
export default function Example() {
return <DynamicText />;
}Props
modeDynamicTextModeDefault "morph"morph: letters travel, fall and land. decode: monospace cells scramble and lock left to right. cycle: morphs through words with a greeting rhythm (a long first word, faster middle words, a hold on the last).
textstringThe string to show. Change it to animate. When set, words is ignored.
words(string | Greeting)[]Words to rotate through when text is not set.
intervalnumberMilliseconds each word holds. In cycle mode this is the first word's hold; the middle words speed up from there.
loopbooleanStart over after the last word. Defaults to true, except in cycle.
onComplete() => voidCalled once the last word is shown. Never called when looping.
classNamestringExtra classes for the root element.
DynamicTextMode
type DynamicTextMode = "morph" | "decode" | "cycle";Greeting
textrequiredstringlangstringBCP 47 language tag, so screen readers pronounce each word correctly.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

