This component is created on top of the Mantine library.
Mantine TextAnimate is a comprehensive animation toolkit for text in React, designed to integrate seamlessly with Mantine UI. At its core, the TextAnimate component lets you choose entry/exit/static states and apply animations such as slide, scale, and blur, while controlling granularity with the by prop (character, word, line) and timing through duration, delay, and segmentDelay. Fine‑tuning is enabled via animateProps—translateDistance, scaleAmount, and blurAmount—so you can tailor motion intensity per effect. Event handlers like onAnimationStart and onAnimationEnd make it straightforward to react to animation lifecycles.
Beyond basic text transitions, the package offers higher‑level primitives for common patterns: TextAnimate.Typewriter and the useTypewriter hook provide cursor and blink options, speed/delay controls, loop behavior, multiline rendering, and hooks to start/stop/reset typing, plus onTypeEnd and onTypeLoop callbacks.
For data presentations, useNumberTicker animates numeric values with speed, easing, and completion callbacks, while useTextTicker reveals target strings from random characters with configurable character sets, reveal direction, and lifecycle control. Styling is fully compatible with Mantine props, and global styles can be imported directly or within a CSS layer, making the system flexible for documentation sites, dashboards, and rich UI interactions.
npm install @gfazioli/mantine-text-animateor
yarn add @gfazioli/mantine-text-animateAfter installation import package styles at the root of your application:
import '@gfazioli/mantine-text-animate/styles.css';import { TextAnimate } from '@gfazioli/mantine-text-animate';
function Demo() {
return (
<TextAnimate animate="in" animation="slideUp" by="character">
Mantine TextAnimate component
</TextAnimate>
);
}ta-02.mp4
import { TextAnimate } from '@gfazioli/mantine-text-animate';
function Demo() {
return (
<TextAnimate.Typewriter value="Hello, World! Mantine Typewriter component" animate />
);
}import { useTypewriter } from '@gfazioli/mantine-text-animate'
function Demo() {
const { text, start, stop, reset, isTyping } = useTypewriter({
value: ['Hello', 'From', 'Mantine useTypewriter() hook'],
});
return (
<div>{text}</div>
);
}ta-03.mp4
import { TextAnimate } from '@gfazioli/mantine-text-animate';
function Demo() {
return (
<TextAnimate.Spinner>★ SPINNING TEXT EXAMPLE ★</TextAnimate.Spinner>
);
}ta-04.mp4
import { TextAnimate } from '@gfazioli/mantine-text-animate';
function Demo() {
return (
<TextAnimate.NumberTicker value={100} animate />
);
}import { useNumberTicker } from '@gfazioli/mantine-text-animate'
function Demo() {
const { text, isAnimating, start, stop, reset, displayValue } = useNumberTicker({
value: 64,
startValue: 0,
delay: 0,
decimalPlaces: 0,
speed: 0.2,
easing: 'ease-out',
animate: true,
});
return (
<div>{text}</div>
);
}ta-05.mp4
import { TextAnimate } from '@gfazioli/mantine-text-animate';
function Demo() {
return (
<TextAnimate.TextTicker value="Hello, World! Mantine TextTicker component" animate />
);
}import { useTextTicker } from '@gfazioli/mantine-text-animate'
function Demo() {
const { text, isAnimating, start, stop, reset } = useTextTicker({
value: 'Mantine useTextTicker',
delay: 0,
speed: 0.2,
easing: 'ease-out',
animate: true,
});
return (
<div>{text}</div>
);
}Your support helps me:
- Keep the project actively maintained with timely bug fixes and security updates
- Add new features, improve performance, and refine the developer experience
- Expand test coverage and documentation for smoother adoption
- Ensure long‑term sustainability without relying on ad hoc free time
- Prioritize community requests and roadmap items that matter most
Open source thrives when those who benefit can give back—even a small monthly contribution makes a real difference. Sponsorships help cover maintenance time, infrastructure, and the countless invisible tasks that keep a project healthy.
Your help truly matters.
💚 Become a sponsor today and help me keep this project reliable, up‑to‑date, and growing for everyone.
