Introducing Magic UI Pro - 50+ blocks and templates to build beautiful landing pages in minutes.

19.0k
178

Text Animate

PreviousNext

A text animation component that animates text using a variety of different animations.

Installation

pnpm dlx shadcn@latest add @magicui/text-animate

Examples

Blur In by Text

Slide Up by Word

Scale Up by Text

Fade In by Line

Slide Left by Character

With Delay

With Duration

With Custom Motion Variants

Usage

import { TextAnimate } from "@/components/magicui/text-animate";
<TextAnimate animation="blurInUp" by="word">
  Blur in by word
</TextAnimate>

Props

PropTypeDefaultDescription
childrenstring-The text content to animate
classNamestring-The class name to be applied to the component
delaynumber0Delay before animation starts
durationnumber0.3Duration of the animation
variantsVariants-Custom motion variants for the animation
asElementType"p"The element type to render
by"text" | "word" | "character" | "line""word"How to split the text ("text", "word", "character")
startOnViewbooleantrueWhether to start animation when component enters viewport
oncebooleanfalseWhether to animate only once
animationAnimationVariant"fadeIn"The animation preset to use