Introducing Aceternity UI Pro - 70+ premium component packs and templates to build amazing websites.
Logo

Lens

A lens component to zoom into images, videos, or practically anything.

Open in
image

Apple Vision Pro

The all new apple vision pro was the best thing that happened around 8 months ago, not anymore.

Installation

Run the following command

npx shadcn@latest add @aceternity/lens

Examples

Basic with Animation

Open in
image

Apple Vision Pro

The all new apple vision pro was the best thing that happened around 8 months ago, not anymore.

Static

Open in
image
image

Apple Vision Pro

The all new apple vision pro was the best thing that happened around 8 months ago, not anymore.

Lens on a React Component

Open in
image

Apple Vision Pro

The all new apple vision pro was the best thing that happened around 8 months ago, not anymore.

Props

PropTypeDefaultDescription
childrenReact.ReactNodeRequiredThe content to be displayed inside the lens
zoomFactornumber1.5The magnification factor for the lens
lensSizenumber170The diameter of the lens in pixels
position{ x: number, y: number }{ x: 200, y: 150 }The static position of the lens (when isStatic is true)
isStaticbooleanfalseIf true, the lens stays in a fixed position; if false, it follows the mouse
isFocusing() => void-Callback function when the lens is focusing (not used in current implementation)
hoveringboolean-External control for the hover state
setHovering(hovering: boolean) => void-External setter for the hover state

Build websites faster and 10x better than your competitors with

Aceternity UI Pro

Next.js 15, Tailwind CSS v4 and Motion for react powered templates

70+ templates and component blocks combined

Ready to copy paste component blocks, save days of development time

Aceternity UI Pro Demo - Light Mode
A product by Aceternity
Building in public at @mannupaaji