Lens

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

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

image

Apple Vision Pro

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

Static

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

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

200+ templates and blocks combined

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

Aceternity UI Pro Demo - Light Mode

Access an ever-growing collection of premium, meticulously crafted templates and Component Blocks.

A product by Aceternity
Building in public at @mannupaaji

© 2026 Aceternity Labs LLC. All Rights Reserved.