react-gsap Docs
Introduction
Components
TweenTimelineScrollTriggerRevealSplitCharsSplitWordsUsage with TweenUsage with TimelineWith custom delimiterControls
Plugins
Instructions

SplitWords

The SplitWords component is a small helper that splits a text by words and returns one component per word.

import { Controls, PlayState, Timeline, Tween, SplitWords } from 'react-gsap';

Usage with Tween

This
text
gets
splitted
by
words.

Usage with Timeline

This
text
gets
splitted
by
words.

With custom delimiter

You can use the delimiter prop to use a custom delimiter string.

This
|
text
|
gets
|
splitted
|
by
|
custom
|
delimiter