Skip to main content

Img Zoom

The ImgZoom component is available in Studio and provides a magnified preview when a user hovers over an image.

Props

Props NameDescriptionType
srcSource URL of the image. This prop is required.string
widthDefines the component width.string
heightDefines the component height.string
zoomedAreaHeightHeight of the zoomed preview area.number
zoomedAreaWidthWidth of the zoomed preview area.boolean
zoomedAreaOpacityOpacity applied to the zoomed preview area.string
zoomedAreaColorBackground color of the zoomed preview area.string
zoomedImageHeightHeight of the zoomed image.number
zoomedImageWidthWidth of the zoomed image.number
marginLeftMargin between the zoomed image and the original image.number
zoomTypeDetermines the zoom interaction type.string
zoomRateZoom ratio when zoomType is set to on.number
zoomInUrlCustom icon for zoom in.string
zoomOutUrlCustom icon for zoom out.string
imageFitSets the image object-fit property.string
disableZoomEnables or disables zoom.boolean
hideRotationShows or hides the rotation controls.boolean .
visibleControls the visibility of the ImgZoom component.boolean

Methods

Method NameDescriptionExample Code
rotateRotates the image.components.EdtrComp_1.rotate()

zoomType

Sets the image interaction type. Supported values are NextTo and On.

image

zoomedAreaHeight - zoomedAreaWidth

Increasing zoomedAreaHeight and zoomedAreaWidth reduces the zoom level.

marginLeft

Controls the margin between the zoomed image and the source image.

rotate

Rotates the image in 90-degree increments.

Possible values: 0 | 90 | 180 | 270 | 360 | -90 | -180 | -270 | -360

image

Samples Qjson

QImgZoomTypeNextTo
QImgZoomTypeOn
QImgZoomRotate