Skip to content

MazAnimatedText

MazAnimatedText is a standalone component that animates text with a sliding blur effect. It can highlight the last word with a gradient background and supports different animation directions (up, down, left, right).

INFO

Before you have to import the global css files in your project, follow instructions in Getting Started

Basic usage

TIP

This component is SSR friendly. It will display the brut text on the server side with the chosen tag, and the animated text on the client side.

Hello world

Component informations

Props

Prop nameDescriptionTypeValuesDefault
textThe text to animate
@example "Hello"
string-
lastWordThe last word(s) to be highlighted
@example "world"
string-
delayThe delay of the animation
@default 0
number-
directionThe direction of the animation
@default "up"
@values "up", "down", "left", "right"
union-
tagThe tag to use for the text
@default "span"
string-
wordDelayThe delay between each word
@default 75
number-
columnGapThe column gap between each word
@default 0.5
number-
rowGapThe row gap between each word
@default 0
number-
durationThe duration of the animation
@default 2000
number-
oncePlay the animation only once
@default true
boolean-