Command Palette

Search for a command to run...

Docs
Blur Text

Blur Text

Text animation with blur-to-focus reveal effect, supporting word and letter granularity with customizable keyframes

Blur Text Animation

Installation

Examples

Letter-by-Letter with Gradient

Letter by Letter

Animates each letter individually from the bottom with a gradient text effect — ideal for hero headings.

Custom Multi-Step Keyframes

Custom Easing & Speed

Uses custom animationFrom and animationTo props to define a 3-step keyframe animation with heavier initial blur and a subtle bounce.

Usage

import BlurText from "@/components/motionx/blur-text";

Basic heading

<BlurText
  text="Welcome to MotionX"
  className="text-4xl font-bold"
  delay={150}
  animateBy="words"
/>

Letter-by-letter hero

<BlurText
  text="Premium Design"
  className="text-6xl font-extrabold"
  delay={50}
  animateBy="letters"
  direction="bottom"
/>

Custom keyframes

<BlurText
  text="Custom Animation"
  className="text-3xl"
  animationFrom={{ filter: "blur(15px)", opacity: 0, y: -80 }}
  animationTo={[
    { filter: "blur(8px)", opacity: 0.3, y: 10 },
    { filter: "blur(2px)", opacity: 0.7, y: -5 },
    { filter: "blur(0px)", opacity: 1, y: 0 },
  ]}
  stepDuration={0.5}
/>

Props

PropTypeDefaultDescription
textstring""The text content to animate
delaynumber200Stagger delay between elements in milliseconds
classNamestring""Additional CSS classes for custom styling
animateBy"words" | "letters""words"Animate by word or letter granularity
direction"top" | "bottom""top"Direction the text animates from
thresholdnumber0.1IntersectionObserver visibility threshold (0-1)
rootMarginstring"0px"IntersectionObserver root margin
animationFromRecord<string, string | number>Blur + offset based on dirCustom starting keyframe values
animationToRecord<string, string | number>[]Two-step blur-to-clearArray of keyframe steps to animate through
easingEasing | Easing[]LinearMotion easing function(s)
onAnimationComplete() => voidundefinedCallback fired when the last element finishes animating
stepDurationnumber0.35Duration of each keyframe step in seconds

Animation Details

Scroll-triggered

The animation starts automatically when the component enters the viewport using IntersectionObserver. Once triggered, the observer disconnects to prevent re-animation.

Word vs Letter Mode

  • animateBy="words" — Splits text on spaces. Each word is an animated unit. Best for headings and short phrases.
  • animateBy="letters" — Splits text into individual characters. Creates a more dramatic, cinematic effect.

Custom Keyframes

The component supports multi-step keyframe animations. Provide animationFrom for the initial state, and animationTo as an array of intermediate + final states:

// 3-step animation: blur(15px) → blur(8px) → blur(2px) → blur(0px)
animationFrom={{ filter: "blur(15px)", opacity: 0, y: -80 }}
animationTo={[
  { filter: "blur(8px)", opacity: 0.3, y: 10 },
  { filter: "blur(2px)", opacity: 0.7, y: -5 },
  { filter: "blur(0px)", opacity: 1, y: 0 },
]}