Getting Started
Scroll Animations
Text Animations
Hover & Cursor
Sliders & Carousels
Galleries & Grids
Menus & Navigation
Preloaders & Intros
Page Transitions
3D & WebGL
import { InversionLensHover } from "@/registry/tween/inversion-lens-hover"
export function InversionLensHoverDemo() {
return <InversionLensHover />
}
import { InversionLensHover } from "@/components/ui/inversion-lens-hover"<InversionLensHover
image="https://example.com/portrait.jpg"
alt="Portrait lit by a single warm light"
maskRadius={0.2}
/>lerpFactor, and the lens grows to maskRadius on enter and shrinks to zero on leave at radiusLerpSpeed.IntersectionObserver pauses rendering while it is off-screen. Everything is disposed on unmount.prefers-reduced-motion: reduce, the image renders once without the lens.| Prop | Type | Default | Description |
|---|---|---|---|
image | string | remote photo | Image shown full-bleed. |
alt | string | default | Accessible label for the image. |
maskRadius | number | 0.15 | Lens radius relative to the container height. |
maskSpeed | number | 0.75 | Speed of the turbulent edge animation. |
lerpFactor | number | 0.05 | How quickly the lens follows the cursor. |
radiusLerpSpeed | number | 0.1 | How quickly the lens grows and shrinks. |
turbulenceIntensity | number | 0.075 | How jagged the lens edge is. |
className | string | — | Extra classes on the outer container. |