Skip to main content

Methods

note

All Module methods are available in this class.

split​

Splits the text into letters, words, and optionally lines based on configuration.

The method is automatically called on initialization, though it can be manually called at any time.

const text = new SplitText({ container });

text.split();

destroy​

Destroys the instance and cleans up resources.

const text = new SplitText({ container });

text.destroy();