Skip to content

Behaviour Options

transition

Type: String | Default: 'fade' | Values: 'fade' or 'slide'

๐Ÿ“„<code>javascript
new Zoomora({
    transition: 'slide'
});

'fade' scales the image up from 80% while fading in. 'slide' slides it in from the right โ€” works best for galleries where left/right navigation matches the slide direction.


animationDuration

Type: Number | Default: 300

Duration in milliseconds. Set to 0 to disable transitions. 300โ€“400ms is recommended โ€” above 600ms feels sluggish during fast navigation.

๐Ÿ“„<code>javascript
new Zoomora({
    animationDuration: 400
});

closeOnBackgroundClick

Type: Boolean | Default: true | Since: v1.2.0

Clicking the dark overlay outside the image closes the lightbox. Set to false for video galleries to prevent accidental dismissal.

๐Ÿ“„<code>javascript
new Zoomora({
    closeOnBackgroundClick: false
});


maxZoomScale

Type: Number | Default: 3 | Since: v1.3.0 (now functional)

Upper bound for the click-to-cycle and scroll-wheel zoom levels. Zoomora builds its progressive zoom steps (1.5ร—, 2ร—, 3ร—โ€ฆ) up to this value. Setting to 1 disables zoom entirely โ€” the zoom button is hidden and scroll-wheel zoom is inactive. Invalid values (zero, negative, non-numeric) fall back to 3.

new Zoomora({ maxZoomScale: 5 }); // levels: 1ร— โ†’ 1.5ร— โ†’ 2ร— โ†’ 3ร— โ†’ 4ร— โ†’ 5ร—
new Zoomora({ maxZoomScale: 1 }); // zoom disabled entirely

zoomStep

Type: Number | Default: 0.1 | Since: v1.3.0 (now functional)

Scale increment applied per mouse-wheel tick during scroll-wheel zoom, expressed as a fraction of maxZoomScale. Smaller values give finer control; larger values jump faster. Has no effect when showZoom: false or maxZoomScale: 1.

new Zoomora({ zoomStep: 0.05 }); // fine control โ€” smooth trackpad feel
new Zoomora({ zoomStep: 0.3 }); // coarse โ€” fast jumps per scroll tick

Recommended Configurations

Photography Portfolio:

๐Ÿ“„<code>javascript
new Zoomora({
    transition: 'fade',
    animationDuration: 400,
    autoHideEnabled: true,
    autoHideDelay: 2000
});

Product Images:

๐Ÿ“„<code>javascript
new Zoomora({
    transition: 'slide',
    animationDuration: 250,
    maxZoomScale: 4,
    zoomStep: 0.05
});

Video Gallery:

๐Ÿ“„<code>javascript
new Zoomora({
    transition: 'fade',
    closeOnBackgroundClick: false,
    showZoom: false
});

On This Page