Skip to content
AIDD

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 ​

zoomed-img
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.
altString"zoomed-img"Alternative text description of the image for accessibility.
zoomScaleNumber2The desired zoom scale of the image.
sizeNumber200The initial magnifier size in pixels.
resizeOnWheelBooleantrueAllow magnifier resize on mouse wheel.

Events ​

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

Released under the MIT License.