Lens

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

Examples

Basic

Static

Lens are static in center

API

Prop NameTypeDefaultDescription
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.
hoveringboolean"false"External control for the hover state.

Component Code

You can copy and paste the following code to create these components:

Lens.vue
Rays.vue
Beams.vue