Skip to content

Text Reveal (Words)

DisplayMIT
View in Storybook

Word-by-word text reveal animation triggered on scroll.

bun add @otfdashkit/ui

Preview

Text Reveal (Words)
Loading Storybook preview…

Code

import { TextReveal } from '@otfdashkit/ui'

export function Example() {
  return (
    <TextReveal
      mode="words"
      text="Every template ships with extraordinary design, production-ready SDK, and AI-tool integration baked in."
      className="text-xl text-foreground max-w-md"
    />
  )
}

Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.

Props

Props declared in the TextReveal source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
textrequiredstringThe text to reveal
as'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4''span'
autoStartbooleantrueWhether to start on intersection (default true)
classNamestring
delaynumber0Base animation delay before first unit starts (ms)
durationnumber500Individual item animation duration in ms (default 500)
mode'words' | 'chars' | 'lines''words'Reveal mode
staggernumber50Delay between each word/char in ms (default 50)
styleCSSProperties