Skip to content
AIDD

Custom Styles ​

The library provides an extensive set of CSS classes for customizing all component elements. These classes are prefixed with vz- (ViewerZoom) for easy identification and to avoid conflicts with other styles in your application.

Note

Some CSS properties like overflow, transform, and translate may interfere with the core functionality of components. Exercise caution when modifying these properties as they could break zoom, pan, or magnification features.

Components ​

Zoom Image ​

The Zoom Image component follows a nested container pattern to maintain proper scaling and positioning:

html
<div class="vz-zoomimg-container">
  <div class="vz-zoomimg-img-container">
    <img class="vz-zoomimg-img" />
  </div>
</div>

Classes Reference ​

Class NamePurpose
vz-zoomimg-containerOutermost container
vz-zoomimg-img-containerDirect image wrapper
vz-zoomimg-imgImage element

Magnifier ​

The Magnifier uses a layered approach with the lens overlay positioned above the base image:

Structure ​

html
<div class="vz-magnifier-img-container">
  <img class="vz-magnifier-img" />
  <div class="vz-magnifier-lens">
    <img class="vz-magnifier-lens-img" />
  </div>
</div>

Classes Reference ​

Class NamePurpose
vz-magnifier-img-containerMain container
vz-magnifier-imgBase image
vz-magnifier-lensMagnifying lens
vz-magnifier-lens-imgMagnified image

Controls ​

Zoom Buttons ​

The buttons are grouped in a container for consistent positioning and spacing. The icons inside buttons are background images in case you want to change them users background image css property:

html
<div class="vz-zoom-btns-container">
  <button class="vz-controls-btn vz-zoom-out-btn" />
  <button class="vz-controls-btn vz-zoom-in-btn" />
</div>

Classes Reference ​

Class NamePurpose
vz-zoom-btns-containerButton group wrapper
vz-controls-btnBase button styles
vz-zoom-out-btnZoom out button
vz-zoom-in-btnZoom in button

Zoom Map ​

The map uses a container with a miniature image and an overlay window indicator:

html
<div class="vz-map-container">
  <img class="vz-map-img" />
  <div class="vz-map-window" />
</div>

Classes Reference ​

Class NamePurpose
vz-map-containerMap wrapper
vz-map-imgMiniature image
vz-map-windowViewport indicator

Released under the MIT License.