Focus In Text
Words or letters come into focus one after another, with five effects, loops and a hover focus.
pixikit.com/docs/effects/focus-in-text
Customize
Effect
Animate by
Direction
Stagger from
Trigger
Delay200ms
Step duration0.35s
Loop
Loop delay2.0s
Blur10px
Distance50px
Color
From color
Focus on hover
Easing
Props
22| Name | Type | Default | Description |
|---|---|---|---|
text | string | "" | The text to animate. |
effect | "blur" | "zoom" | "tilt" | "focus" | "drift" | "blur" | How each piece comes in: blur slides in from a side, zoom shrinks down from large, tilt swings in on a 3D angle, focus sharpens in place, drift glides in sideways with a lean. |
animateBy | "words" | "letters" | "words" | Whether each word or each letter comes in on its own. |
direction | "top" | "bottom" | "left" | "right" | "top" | The side the pieces move in from. |
staggerFrom | "start" | "center" | "end" | "random" | "start" | Where the stagger starts. |
trigger | "view" | "load" | "hover" | "click" | "view" | When the text comes in; hover and click show it and replay it each time. |
delay | number | 200 | Milliseconds between one piece and the next. |
stepDuration | number | 0.35 | Seconds each of the two steps takes. |
loop | boolean | false | Keep replaying: the text holds, blurs back out and comes in again. |
loopDelay | number | 2 | Seconds the text stays sharp before it blurs out again when looping. |
blur | number | 10 | How blurred each piece starts, in pixels. |
distance | number | 50 | How far each piece travels into place, in pixels. |
color | string | "currentColor" | The text colour; follows the surrounding text by default. |
fromColor | string | "" | A colour each piece starts in before it settles on the text colour. |
focusOnHover | boolean | false | Hovering a word keeps it sharp while the other words soften and dim. |
threshold | number | 0.1 | How much of the text must be visible before it plays, 0 to 1. |
rootMargin | string | "0px" | The margin around the viewport for the visibility check. |
animationFrom | Keyframe | None | A custom starting keyframe; replaces the effect, blur, distance and direction. |
animationTo | Keyframe[] | None | Custom keyframes to animate through after animationFrom. |
easing | string | "" | A CSS easing for every step; empty uses the effect's own. |
onAnimationComplete | () => void | None | Called each time the text finishes coming in. |
className | string | None |