Text animation

Paragraph with growing highlights

The same word-by-word reveal, but the highlight accumulates instead of looping between phrases: they light up in turn and stand together, the assembled summary holds for a beat, fades out as a whole — and the round starts again.

What you can change

  • the paragraph text in the text prop
  • the set of highlighted phrases in highlights — words from the same paragraph, not indices
  • the highlight color via the accent prop to match your brand

A link for your AI agent: preview, code and instructions.

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.
AI
1Pick it here

put this on the home page as the hero:

https://vibeui.ru/c/text-003?lang=en&theme=dark

2Paste into the chat
3Get it in your project

Not sure where to paste it? Step-by-step guide

Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

Loading…

For developers

The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.

Technical notes

The component is self-contained: one file, zero dependencies, palette in local --vibeui-text-003-* variables. It takes the theme from the environment via light-dark() plus a rule for the .dark class. The paragraph arrives as a single string in the text prop and is split into words right here; the highlighted parts are given as words in highlights rather than indices: the component looks for each phrase as a consecutive chain of words, compared without surrounding punctuation. A word reveals with translateY(30%) → 0, blur(10px) → 0, opacity 0 → 1 over 550 ms on cubic-bezier(0.16,1,0.3,1), delayed by calc(45 ms * word index). The highlight grows from the left edge (transform-origin:left) — scaleX 0.78 → 1 and opacity over 300 ms on a spring written out as linear() points; the word under it switches to the accent color (--vibeui-text-003-accent-text) while the backdrop stays lighter than the accent, since accent on accent would not read. A client timer runs the round: it starts once the paragraph has settled, lights the phrases step seconds apart, holds the assembled summary for 1.8 s, clears everything at once and starts again after a 0.7 s pause. Under prefers-reduced-motion the timer never starts and the whole summary is shown at once. The lit state arrives inline (opacity, transform and the word color) rather than through a rule on a data attribute: a re-render flips the attributes of the word and its backdrop at once, and such a rule was recomputed one step behind. The data-on and data-edge attributes stay in the markup as a hook for outside styles.

Tags

  • text
  • animated text
  • paragraph
  • highlight
  • progressive
  • loop
  • blur
  • reveal
  • stagger
  • words
Component source

The same file your agent installs. Here in case you would rather copy it by hand.

Loading…