After downloading Zoomist, there are a few steps to create a Zoomist:
You need to add Zoomist layout in your HTML:
<!-- zoomist-container --><div class="zoomist-container"> <!-- zoomist-wrapper is required --> <div class="zoomist-wrapper"> <!-- zoomist-image is required --> <div class="zoomist-image"> <!-- you can add anything you want to zoom here. --> <img src="..." /> </div> </div></div>
You may want to add some custom styles:
.zoomist-container { width: 100%; max-width: 600px;}
.zoomist-image { width: 100%; aspect-ratio: 1;}
.zoomist-image img { width: 100%; height: 100%; object-fit: cover; object-position: center;}
Finally, initialize Zoomist in your JS file:
import Zoomist from 'zoomist'
new Zoomist('.zoomist-container', { // Optional parameters maxScale: 4, bounds: true, // if you need slider slider: true, // if you need zoomer zoomer: true})