Animated TextGenerate

Generates animated text word-by-word with blur, highlights, links, and smooth effects.

Loading...

Installation

npx shadcn@latest add @scrollxui/animated-textgenerate 

Usage

import { AnimatedTextGenerate } from '@/components/ui/animated-textgenerate';
<AnimatedTextGenerate
  text='Pressure changes everything. Some people focus, others fold.'
  className='text-center my-10'
  textClassName='text-3xl text-gray-800 dark:text-white'
  blurEffect={true}
  speed={0.5}
  highlightWords={['Pressure', 'focus']}
  highlightClassName='text-blue-500'
  linkWords={['everything']}
  linkHrefs={['/about']}
  linkClassNames={['underline text-red-500']}
/>

API Reference

Animated TextGenerate

Creates a flowing reading effect with staggered words, styling emphasis, and interactions.

Props

PropertyTypeDefaultDescription
textstringrequired
The full string of text to animate word-by-word.
classNamestringoptional
Additional classNames for styling the outer container.
textClassNamestringoptional
Additional classNames for styling the text container.
blurEffectbooleantrue
Applies a blur-in animation when words appear.
speednumber0.5
Controls the speed of the animation. Lower is faster.
highlightWordsstring[][]
Array of words to highlight visually when they appear.
highlightClassNamestringoptional
Class applied to highlighted words for styling (e.g., color).
linkWordsstring[][]
Words to turn into links during animation.
linkHrefsstring[][]
Corresponding href values for linkWords. Must match linkWords length.
linkClassNamesstring[][]
ClassNames applied individually to each link in linkWords.

Built withby Ahdeetai.