How To Use Vue-Zoomer In Vue.js

In this article, We will learn the how to use the vue-zommer in vue.js.


  • Zoom the image or other thing with mouse or touch.

Step: 1 Create a new Vue project:

vue create vue-zoomer-demo

Step: 2 Install the require packages:

npm i vue-zoomer

Step: 3 Open main.js file and add the following in it:

import Vue from 'vue'
import App from './App.vue'
import VueZoomer from 'vue-zoomer'

Vue.config.productionTip = false

new Vue({
  render: h => h(App),

Step: 4 Open App.vue file and add the following in it:

  <div id="app">
      style="width: 500px; border: solid 1px silver;margin:auto;"
        style="object-fit: contain; width: 100%; height: 100%;"


export default {
  name: "App",
  data() {
    return {
      zoomed: false,

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;

Code in Action:

Submit a Comment

Your email address will not be published. Required fields are marked *


Select Categories