Staggered Text

Flexible, feature-rich text animation component for staggered reveals

staggered-text-tw

Build faster
than ever

Customize

1s
80ms

Props

NameTypeDefaultDescription
textstring""The text content to animate with staggered effect.
classNamestring""Additional CSS classes to apply to the container.
as"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span""p"The HTML element to render as.
segmentBy"chars" | "words" | "lines""words"How to split the text for staggered animation.
separatorstringundefinedCustom separator to split text into rows/lines before segmenting.
delaynumber80Delay between each segment animation in milliseconds.
durationnumber0.6Duration of each segment animation in seconds.
easingEasing | Easing[](t) => tMotion easing function (single or per-keyframe).
thresholdnumber0.1IntersectionObserver threshold for scroll trigger.
rootMarginstring"0px"IntersectionObserver rootMargin for scroll trigger.
direction"top" | "bottom" | "left" | "right""top"Direction of movement for the animation.
blurbooleantrueEnable blur effect in the default animation.
staggerDirection"forward" | "reverse" | "center""forward"Direction of stagger: forward (start to end), reverse (end to start), or center (middle out).
respectReducedMotionbooleantrueRespect user's prefers-reduced-motion setting.
exitOnScrollOutbooleanfalseAutomatically trigger exit animation when component scrolls out of view.
fromMotionStyleundefinedOverride default initial animation state.
toMotionStyle | MotionStyle[]undefinedOverride default final animation state(s).
onAnimationComplete() => voidundefinedCallback fired when the last segment finishes animating.
onExitComplete() => voidundefinedCallback fired when exit animation completes.