text-animations/split-text

Split Text

Preview

Reveal your words, one line at a time

● live previewing Vue (reference)

Props
Split bychars
Maskon
Stagger0.05s
Duration0.8s

Prerequisites

install terminal
  • SplitText and ScrollTrigger ship inside the gsap package (free since v3.13).

Component

variant
source SplitText.vue

Usage

usage App.vue

API

PropTypeDefaultDescription
splitBy"chars" | "words" | "lines""chars"What to split the text into before staggering. Chars is the flashiest; words is lighter for longer copy.
maskbooleantrueClip each unit so the text rises from behind a hard edge — the polished reveal. Maps to GSAP's mask option.
staggernumber0.05Delay between each unit's animation, in seconds.
durationnumber0.8Duration of each unit's animation, in seconds.
easestring"power4.out"GSAP easing function for the reveal.
fromRecord<string, number | string>{ opacity: 0, y: "100%" }Starting GSAP state for each unit. Any tween vars — swap in x, rotate, or scale for a different entrance.
toRecord<string, number | string>{ opacity: 1, y: 0 }Ending GSAP state for each unit.