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).

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

Props

NameDescriptionTypeRequiredDefaultPossible values
textThe text to animate
Example: "Hello"
stringYesundefined-
last-wordThe last word(s) to be highlighted
Example: "world"
stringNoundefined-
delayThe delay of the animationnumberNo0-
directionThe direction of the animation"up" | "down" | "left" | "right"Noupup", "down", "left", "right
tagThe tag to use for the textstringNospan-
word-delayThe delay between each wordnumberNo75-
column-gapThe column gap between each wordnumberNo0.5-
row-gapThe row gap between each wordnumberNo0-
durationThe duration of the animationnumberNo2000-
oncePlay the animation only oncebooleanNotrue-