Modus UI

Blur Text

Web (React)

Smoothly unblurs text characters or words as they enter the viewport.

Smoothly unblurs text characters or words as they enter the viewport. A highly elegant and sophisticated text entrance animation powered entirely by Framer Motion.

Installation

CLI

npx @modus-ui/cli add blur-text

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/blur-text.tsx.
  3. Paste the code.

Usage

tsx
import { BlurText } from "@/components/ui/blur-text";

export default function Example() {
  return (
    <BlurText
      text="Isn't this just beautiful?"
      delay={150}
      animateBy="words"
      direction="top"
      className="font-serif text-4xl"
    />
  );
}

Props

PropTypeDefaultDescription
textstring""The text to animate.
delaynumber200Milliseconds between each word or letter.
animateBy"words" | "letters""words"Whether to animate word by word or letter by letter.
direction"top" | "bottom""top"Direction the text enters from.
thresholdnumber0.1Fraction visible before the animation starts.
rootMarginstring"0px"Intersection observer root margin.
animationFromRecord<string, any>-Starting animation values.
animationToRecord<string, any>[]-Keyframes to animate through.
easingstring | number[] | ((t: number) => number)"easeOut"Framer Motion easing.
onAnimationComplete() => void-Called when the last segment finishes.
stepDurationnumber0.35Seconds per keyframe step.

Comments

  • No comments yet.