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| Name | Type | Default | Description |
|---|---|---|---|
text | string | "Bend the moment" | The headline. Use \n for line breaks. |
color | string | "currentColor" | The text colour before the glass pass. Follows the surrounding text by default. |
warpStrength | number | 0.08 | The amount of ambient distortion at rest. |
warpScale | number | 1.7 | The size of the moving distortion cells. |
speed | number | 0.55 | The speed of the ambient motion. |
lens | "bulge" | "pinch" | "swirl" | "bulge" | How the pointer bends the text: magnify it, pull it inward or twist it. |
pointerInfluence | number | 0.42 | The radius of the lens, as a share of the height. |
pointerStrength | number | 0.38 | The strength of the lens. |
idleDrift | number | 0.2 | How strongly the lens keeps wandering over the text while the pointer is away, 0 to 1. |
chromatic | number | 0 | Colour fringing inside the lens and click ripples, 0 to 1. |
refraction | number | 0.018 | A subtle channel split wherever the glass bends. |
ripple | boolean | true | Adds a soft ripple to the pointer lens. |
clickRipple | boolean | true | Clicking sends a shockwave ring through the text. |
intro | boolean | true | Fades the text in from a strong warp that settles once it comes into view. |
fontSize | string | number | "clamp(3rem, 10vw, 9rem)" | The font size. Numbers are pixels. The text shrinks to fit its container. |
fontWeight | string | number | 800 | The font weight. |
fontFamily | string | "inherit" | The font family. |
letterSpacing | string | number | "-0.06em" | The tracking. |
lineHeight | string | number | 0.9 | The line height for text with line breaks. |
className | string | None | |
style | CSSProperties | None |