# GSAP SplitText

> Splits text into lines, words and characters (with masks) for staggered reveal animations.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/gsap-splittext

free

Splits text into lines, words and characters (with masks) for staggered reveal animations.

by GreenSock (Webflow)[GitHub](https://github.com/greensock/GSAP)[npm](https://npmjs.com/package/gsap)

[visit](https://gsap.com/docs/v3/Plugins/SplitText?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://gsap.com/docs/v3/Plugins/SplitText](https://gsap.com/docs/v3/Plugins/SplitText?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Torph](https://tastebase.ehsanulsiam.workers.dev/browse/torph)

Animated text morphing: labels change letter by letter instead of swapping.

no preview

### [useScramble](https://tastebase.ehsanulsiam.workers.dev/browse/use-scramble)

1 KB React hook that scrambles text through random characters before settling (decrypt effect).

no preview

### [GSAP](https://tastebase.ehsanulsiam.workers.dev/browse/gsap)

Timeline animation engine with ScrollTrigger, SplitText, Flip and MorphSVG, now free including every plugin.

no preview

### [Lenis](https://tastebase.ehsanulsiam.workers.dev/browse/lenis)

Smooth, inertia-based wheel scrolling that keeps native scroll position, sticky and anchors working.

## Looks that pick it

[Art decofirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/art-deco)[Magazinefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/magazine)[Kinetic typographyfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/kinetic-typography)[Oversized typefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/oversized-type)[Constructivismfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/constructivism)[Anti-designfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/anti-design)[Maximalismfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/maximalism)[Grungefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/grunge)[Pop art / comic](https://tastebase.ehsanulsiam.workers.dev/looks/pop-art)

## For your agent

##### Install

`npm i gsap`

##### Use it for

- a hero headline that rises line by line out of a mask
- editorial section titles that reveal by word as they scroll into view
- character-level kinetic type on a brand or portfolio site
- a typewriter headline whose characters appear one at a time (stagger the chars)

##### Skip it when

- app UI and labels: splitting text in product UI is distracting; use torph for label changes
- body copy or long paragraphs: animate the block's opacity instead
- you only want balanced headline wrapping: use CSS text-wrap: balance, no library

##### What's inside10 free

- SplitText.create()
- Chars
- Words
- Lines
- Masks
- autoSplit
- onSplit()
- revert()
- smartWrap
- aria

##### Facts

**Frameworks**
vanilla, react, vue, svelte, solid, angular

**Styling**
unstyled

**Weight**
small

**Accessibility**
ok

**Maturity**
established

**License**
GSAP Standard 'no charge' license (free, commercial use allowed)

**Price**
Free

##### Pairs with

[GSAP](https://tastebase.ehsanulsiam.workers.dev/browse/gsap)[Lenis](https://tastebase.ehsanulsiam.workers.dev/browse/lenis)

##### Alternatives

[Torph](https://tastebase.ehsanulsiam.workers.dev/browse/torph)[useScramble](https://tastebase.ehsanulsiam.workers.dev/browse/use-scramble)

[Compare GSAP SplitText with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/gsap-splittext-alternatives)

```
import gsap from 'gsap'
import { SplitText } from 'gsap/SplitText'

gsap.registerPlugin(SplitText)

SplitText.create('.headline', {
  type: 'lines',
  mask: 'lines',
  autoSplit: true,
  onSplit: (self) => gsap.from(self.lines, { yPercent: 100, stagger: 0.08, duration: 0.8, ease: 'expo.out' }),
})
```

https://gsap.com/docs/v3/Plugins/SplitText

This site doesn't allow being shown inside another page. Here is how it looks.

[Open in a new tab](https://gsap.com/docs/v3/Plugins/SplitText?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

[Visit](https://gsap.com/docs/v3/Plugins/SplitText?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
