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-textManual
- Copy the code from the component tab.
- Create a file at
components/ui/blur-text.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | "" | The text to animate. |
delay | number | 200 | Milliseconds 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. |
threshold | number | 0.1 | Fraction visible before the animation starts. |
rootMargin | string | "0px" | Intersection observer root margin. |
animationFrom | Record<string, any> | - | Starting animation values. |
animationTo | Record<string, any>[] | - | Keyframes to animate through. |
easing | string | number[] | ((t: number) => number) | "easeOut" | Framer Motion easing. |
onAnimationComplete | () => void | - | Called when the last segment finishes. |
stepDuration | number | 0.35 | Seconds per keyframe step. |
Comments