Description
Griffo is a text splitting library for JavaScript that splits text into characters, words and lines while keeping the original kerning. Most splitting libraries wrap each letter in its own element, which breaks the subtle spacing between letter pairs, and Griffo measures that spacing and applies small margin adjustments so the split text looks the same. It preserves nested inline elements such as links and emphasis, groups words into rendered lines, and handles dashes so text can still wrap. Other features include re-splitting when a container resizes, restoring the original HTML after an animation, clip masks for reveal effects, correct handling of compound emoji, and automatic screen reader support. It works with React, Motion, GSAP or plain CSS animations, and it ships with TypeScript types. Install it from npm as griffo, and find the source on GitHub.…
Highlights
- Splits text while keeping kerning
- Preserves nested links and emphasis
- Line detection and dash-aware wrapping
- Works with React, Motion and GSAP
- TypeScript types and screen reader support
Ratings & Reviews
No ratings yet
Be the first to rate Griffo.
People also visit
Griffo FAQ
What is Griffo?
It is a JavaScript library that splits text into characters, words and lines while keeping kerning intact, for animations.
How do I install it?
Run npm i griffo, then use it with vanilla JavaScript, React, Motion or CSS animations.
Why is kerning a problem?
Wrapping each character in its own element breaks the spacing between letter pairs. Griffo adds small adjustments so the text keeps its original spacing.
Is there a free version?
The site lists the library as free, and the source is on GitHub.
What are the best Griffo alternatives?
Popular alternatives to Griffo include TypingSVG, Tegaki and Readme Typing SVG. See all Griffo alternatives










