An all-in-one text splitter function to easily split, wrap, and clone text
Anime.js text.split() utility function is an easy to use, fully-featured, lightweight and performant modern text splitter for JavaScript.
It does all the following in only 7KB:
- Can split text by characters, words, and lines.
- Support splitting through elements like links with nested elements like
<strong>tags and any level of nested tags automatically. - Element cloning with configurable position.
- Use your own custom wrapper with a powerful templating system.
- Split words in languages that don't use spaces like Chinese and Japanese この日本語の文のように.
- Handles splitting ѕρє¢ιαℓ ¢нαяα¢тєяѕ and 🇪Ⓜ️🅾️🇯ℹ️s.
- Is accessible for screen readers.
- And is 100% responsive.
Check out the full documenation and learn more at animejs.com/documentation.