Skip to content
OTF Kit logoOTF Kit

Text Reveal (Words)

Display

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

View in Storybook
Text Reveal (Words)
Loading Storybook preview…

Installation

bun add @otfdashkit/ui

Usage

Import Text Reveal (Words) from @otfdashkit/ui.

Code
// Text Reveal (Words) — Word-by-word text reveal animation triggered on scroll.
//
// Install:
//   bun add @otfdashkit/ui

import { TextReveal(Words) } from '@otfdashkit/ui'

export function Example() {
  return (
    <TextReveal(Words)>
      {/* your content */}
    </TextReveal(Words)>
  )
}

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

Related