Text Morph
A fluid text primitive that blends one value into the next while preserving its visual center and inheriting the surrounding typography.
Installation#
pnpm dlx shadcn@latest add @davinciui/text-morphUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
wordsText, numbers, prices, or short phrases displayed by the morph sequence. | string[] | ["DAVINCIUI", "COMPONENTS"] |
intervalTime each value rests before the next morph begins, in milliseconds. | number | 2600 |
morphDurationDuration of the fluid morph in milliseconds. | number | 680 |
classNameAdditional classes for layout or typography. All visual text properties inherit naturally. | string | — |
Accessibility#
Text Morph cycles visible words on a timer and renders plain text with no live-region announcements. Treat the animation as enhancement: keep the surrounding heading meaningful on its own, and don't put the only instance of critical information inside the morph sequence.
Motion#
The fluid morph runs on a per-word timer controlled by the interval and morphDuration props. When the visitor prefers reduced motion, the component swaps words instantly with no blur or morph transition.
Customization#
All visual text properties inherit from the surrounding typography. Set size, weight, and tracking with className instead of editing the component. Colors follow the current theme tokens.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

