Skip to content
Components52 / 118

Liquid Lens

A blob of liquid glass that follows your cursor over your own text. It magnifies the centre, bends hard at the rim, splits the light into a rainbow fringe and catches a highlight, and it squashes and stretches along the way you move it. Wrap any headline in it, or use the built-in scrolling rows.

WebGLWorks over any textZero dependencies60fpsReduced-motion safe

Glass over anything you write.

Steer the glass, move fast to squash it

Tweak

LIVE

Under the glass

Your own text

Off shows scrolling rows

#f2f0eb

Scrolling rows

#2b5cff
#ff4d00
1.00

Scene

#0b0b0c

Glass

1.00
1.60
1.00
1.00
#bdd5ff
#ff7326

Props

12 props
  • childrenReactNode
    Your text, put under the glass word for word: same fonts, colours and positions. The real text stays in the DOM.
  • backgroundstring
    Colour behind the text. Defaults to the element's own background, else near-black.
  • sizenumber
    Lens size multiplier.default 1
  • zoomnumber
    How much the lens magnifies its centre. 1 means none.default 1.6
  • refractionnumber
    How hard the rim bends what is under it.default 1
  • aberrationnumber
    Strength of the rainbow fringe toward the rim.default 1
  • tintstring
    Tint of the glass body.default "#bdd5ff"
  • rimstring
    Colour of the light pooled inside the far rim.default "#ff7326"
  • wordsstring[]
    Scrolling rows, used when there are no children.default ["MOTION", "SHADER", …]
  • colorsstring[]
    Colour per scrolling row; cycles.default chalk, cobalt, chalk, signal…
  • speednumber
    Speed of the scrolling rows.default 1
  • classNamestring
    Size or pad it, e.g. px-10 py-24, or h-[420px] w-full for rows.