Installation
pnpm add fettabun add fettanpm install fettayarn add fettaQuick Start
React
import { SplitText } from 'fetta/react';
import { animate, stagger } from 'motion';
<SplitText
onSplit={({ chars }) => {
animate(chars, { opacity: [0, 1] }, { delay: stagger(0.02) });
}}
>
<h1>Hello world</h1>
</SplitText>Vanilla JavaScript
import { splitText } from 'fetta';
const { chars } = splitText(document.querySelector('h1'));
// Animate with any library