Split Text

A powerful text animation component that splits content into lines, words, or characters and animates them with GSAP.

This is animated by word

Props

PropertyTypeDefaultDescription
childrenReactNodeContent to be split and animated. Can be a single text node or any valid React element.
type"lines" | "words" | "chars" | "lines,words,chars""lines"Specifies how the text should be split. Can be any combination of "lines", "words", and "chars".
animateOnScrollbooleantrueControls whether the animation should be triggered on scroll. If false, animation starts immediately.
delaynumber0Delay (in seconds) before the animation begins.
durationnumber1Duration (in seconds) of the animation for each element.
staggernumber0.1Amount of delay (in seconds) between each element's animation start.
easestring"power4.out"The easing function to use for the animation. Accepts any valid GSAP easing string.
triggerStartstring"top 75%"ScrollTrigger start value. Defines when the animation should start relative to the viewport.
triggerEndstring"bottom top"ScrollTrigger end value. Defines when the animation should end relative to the viewport.
oncebooleantrueIf true, the scroll-based animation will only occur once when the element enters the viewport.
classNamestring""CSS class for styling the wrapper or target element.

Made withby this guy