Skip to content
Image Effects

FocusLens

The picture is sharp at rest. With the mouse, a finger or the arrow keys, the rest goes soft and a round lens shows that spot enlarged.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
srcstring—Picture address.
altstring—Text for screen readers.
zoomnumber1.8How much the lens enlarges.
radiusnumber80Lens radius in pixels.
blurnumber4Blur on the rest of the picture while the lens is out, in pixels.
classNamestring"aspect-video"Set the size here.