Skip to content

Magnifier Component

Overview

The Magnifier component allows users to view an enlarged portion of an image in a container like a glass magnifier when they hover over the image.

Basic Usage

image
zoom-image
vue
<Magnifier :src="imageSrc" :zoom-scale="3" :size="250" />

Note

You can also increase or decrease the magnifier size using the mouse wheel.

Props and Events

Props

NameTypeDefaultDescription
srcStringrequiredThe source URL of the image to be zoomed.
zoomScaleNumber2The desired zoom scale of the image.
sizeNumber200The initial magnifier size in pixels.

Events

NameDescription
loadTriggered when the image has successfully loaded.
errorTriggered when there is an error loading the image.

Released under the MIT License.