Skip to content
PixiKit

Lens Text

A headline seen through moving glass, drawn with WebGL: it undulates gently at rest, bulges, pinches or swirls under a lens that follows the pointer, splits into colour fringes and sends a shockwave through the letters on click.

pixikit.com/docs/effects/lens-text

Customize

Color
Warp strength0.08
Warp scale1.7
Speed0.55
Lens
Pointer influence0.42
Pointer strength0.38
Idle drift0.20
Chromatic0.35
Refraction0.018
Ripple
Click ripple
Intro
Font weight
Font family
Line height0.90

Props

21
NameTypeDefaultDescription
textstring"Bend the moment"The headline. Use \n for line breaks.
colorstring"currentColor"The text colour before the glass pass. Follows the surrounding text by default.
warpStrengthnumber0.08The amount of ambient distortion at rest.
warpScalenumber1.7The size of the moving distortion cells.
speednumber0.55The speed of the ambient motion.
lens"bulge" | "pinch" | "swirl""bulge"How the pointer bends the text: magnify it, pull it inward or twist it.
pointerInfluencenumber0.42The radius of the lens, as a share of the height.
pointerStrengthnumber0.38The strength of the lens.
idleDriftnumber0.2How strongly the lens keeps wandering over the text while the pointer is away, 0 to 1.
chromaticnumber0Colour fringing inside the lens and click ripples, 0 to 1.
refractionnumber0.018A subtle channel split wherever the glass bends.
ripplebooleantrueAdds a soft ripple to the pointer lens.
clickRipplebooleantrueClicking sends a shockwave ring through the text.
introbooleantrueFades the text in from a strong warp that settles once it comes into view.
fontSizestring | number"clamp(3rem, 10vw, 9rem)"The font size. Numbers are pixels. The text shrinks to fit its container.
fontWeightstring | number800The font weight.
fontFamilystring"inherit"The font family.
letterSpacingstring | number"-0.06em"The tracking.
lineHeightstring | number0.9The line height for text with line breaks.
classNamestringNone
styleCSSPropertiesNone

More text effects in Pro

View all

Related