ai-animate

Text

SplitText

Words reveal as if curtains slide open from centre with a scaleX animation.

Installation

npm install @ai-animate/core

Usage

import { SplitText } from '@ai-animate/core'


<SplitText text="Something extraordinary awaits" stagger={0.12} />

Props

textstringText to animate (required)
staggernumber0.12Delay between word animations in seconds
durationnumber0.6Duration of each word's reveal in seconds
holdMsnumber1800When looping, hold time before replaying in ms
fontSizestring | number24Font size
colorstring#ffffffText color
backgroundstringtransparentBackground color
fontWeightnumber | string700Font weight
loopbooleanfalseWhether to loop