PRO

Fractal Glass Hover

A hero image seen through vertical fluted glass: a WebGL shader slices it into ~35 refracted stripes, then eased cursor movement drives a subtle parallax that pushes harder where the distortion is strongest, so the surface reads like real ribbed glass reacting to the pointer.

Component

Designed for the space between silence and noise.

Built by BLANK

Install
npx shadcn@latest add https://ui.aryank.space/r/fractal-glass-hover.json

Installs from ui.aryank.space. To add it by hand, copy the files in Usage below, or register the @compronents namespace via the docs.

Files

API
PropTypeDefaultDescription
imgSrcstringBLANK-hosted JPGImage refracted through the glass.
stripesFrequency / glassStrength / glassSmoothnessnumber35 / 2.0 / 0.0001Flute count, refraction strength, and edge softness.
parallaxStrength / distortionMultiplier / lerpFactornumber0.1 / 10 / 0.035Cursor parallax amount, distortion weighting, and easing.
Customize
stripesFrequency / glassStrengthtuple

Number of flutes and refraction strength.

parallaxStrength / lerpFactortuple

Cursor parallax amount and easing.

Dependencies
three