Lens
A lens component to zoom into images, videos, or practically anything.
Install using CLI
Install Manually
Copy and paste the following code in the same folder
Examples
Lens are static in center
API
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. |
Features
- Slot Support: Easily add any content inside the component using the default slot.
Credits
- Credits to Aceternity UI.
- Credits to SivaReddy Uppathi for porting this component.