Quote with SplitText
Master text animations with GSAP SplitText utility
Core Animation Concepts
SplitText Utility
Break text into individual characters, words, or lines for granular animation control. Part of Club GreenSock's premium features.
3D Perspective Effects
Create depth and dimension using perspective properties and transformOrigin settings for professional animations.
Timeline Management
Chain animations together using TimelineLite for synchronized, sequential text effects with precise timing control.
Club GreenSock Membership Benefits
Club GreenSock Membership Benefits
Perspective Property Comparison
| Feature | perspective | transformPerspective |
|---|---|---|
| Applied To | Parent element | Individual elements |
| Vanishing Point | Shared among children | Unique for each element |
| Use Case | Unified 3D space | Independent 3D effects |
Save and preview. Re-inspect the quotation element to confirm clean line-only splitting
Add debugging code to examine SplitText's generated data structure:
quote = new SplitText("#quote", {type:"lines"});
console.log(quote.lines);
This console output reveals the lines array containing DOM references to each generated line element—the foundation for our staggered animations.
Arrays store multiple values with zero-based indexing (0, 1, 2, etc.), making them perfect for iterative animations where each element receives slightly different timing or properties.
Save and preview in Chrome
Open Chrome DevTools with Cmd–Opt–J (Mac) or CTRL–Shift–J (Windows)
Reload and expand the console array output:

Each array element represents a line div, providing direct DOM access for individual animation control. The array length corresponds to visible lines, which varies based on browser width and text reflow.
Remove the debugging code and create the author SplitText object:
quote = new SplitText("#quote", {type:"lines"});
author = new SplitText("#author", {type:"chars"});
Character-level splitting enables the sophisticated letter-by-letter reveal effect for Edison's name.
Save, preview, and inspect the author element to confirm character-level DOM structure:

Using the Revert Method
Implementation Checklist
Ensures revert function runs after all animations finish
Restores original text structure and removes generated divs
Verify that split divs disappear after animation completes
Key Takeaways


