Overview
Lens is a magnifying lens component that can zoom into images, videos, or any content. Features adjustable zoom levels, lens size, and both static and mouse-following modes.Usage
API Reference
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
zoomFactor | number | 1.5 | The magnification factor for the lens. |
lensSize | number | 170 | The 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). |
isStatic | boolean | false | If true, the lens stays in a fixed position; if false, it follows the mouse. |
hovering | boolean | "false" | External control for the hover state. |
Credits
- Credits to Aceternity UI.
- Credits to SivaReddy Uppathi for porting this component.