Image magnifier

Discover image with image magnifier component.


You can discover image with image-magnifier component. To create image magnifier, add role data-role="imagemagnifier" to container and put image in the container. You can create two type of image magnifier: glass and zoom.

Image magnifier glass

To create image magnifier glass, you must add attribute data-magnifier-mode="glass".

                    <div data-role="imagemagnifier" data-magnifier-mode="glass">
                        <img src="images/hopetoun_falls.jpg">

You can use attribute data-lens-type to set type of magnifier lens. To set circle magnifier lens, use value circle. To change size of the lens, use attribute data-lens-size.

                    <div data-role="imagemagnifier"
                        <img src="images/hopetoun_falls.jpg">

Image magnifier zoom

To create image magnifier zoom, you must add attribute data-magnifier-mode="zoom".

                    <div data-role="imagemagnifier" data-magnifier-mode="zoom">
                        <img src="images/hopetoun_falls.jpg">

You can define your one zoom element with attribute data-zoom-element. To set, use right element selector.


To change zooming of the lens, use attribute data-magnifier-zoom. By default this attribute have a value 2. This attribute used for set zoom element size for image magnifier zoom.


You can use attributes data-cls-magnifier, data-cls-lens, data-cls-zoom to customize magnifier elements.