Skip to content
PixiKit

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
NameTypeDefaultDescription
textstring""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.
delaynumber200Milliseconds between one piece and the next.
stepDurationnumber0.35Seconds each of the two steps takes.
loopbooleanfalseKeep replaying: the text holds, blurs back out and comes in again.
loopDelaynumber2Seconds the text stays sharp before it blurs out again when looping.
blurnumber10How blurred each piece starts, in pixels.
distancenumber50How far each piece travels into place, in pixels.
colorstring"currentColor"The text colour; follows the surrounding text by default.
fromColorstring""A colour each piece starts in before it settles on the text colour.
focusOnHoverbooleanfalseHovering a word keeps it sharp while the other words soften and dim.
thresholdnumber0.1How much of the text must be visible before it plays, 0 to 1.
rootMarginstring"0px"The margin around the viewport for the visibility check.
animationFromKeyframeNoneA custom starting keyframe; replaces the effect, blur, distance and direction.
animationToKeyframe[]NoneCustom keyframes to animate through after animationFrom.
easingstring""A CSS easing for every step; empty uses the effect's own.
onAnimationComplete() => voidNoneCalled each time the text finishes coming in.
classNamestringNone

More text effects in Pro

View all

Related