Magnifying Picture Glass Effect In Vue | Photo Zoom Pro

Vue photo zoom pro is a photo zoom component that applies a magnifying glass effect to photos.

vue product zoomer, vue magnifier, vuetify zoom image on hover, vuetify image zoom, vue zoom image on hover, vue pinch zoom, vue image zoom on click

A Simple Generator Plugin for Glassmorphism UI Effect

How to make use of it:

Install and download:

# NPM
$ npm i vue-photo-zoom-pro --save

1. Import and register the component.

import vuePhotoZoomPro from 'vue-photo-zoom-pro'
export default {
  components: {
    vuePhotoZoomPro
  }
}

2. Add the vue-photo-zoom-pro component to the template.

<vue-photo-zoom-pro :high-url="imgSrc">
  <img :src="imgSrc" />
</vue-photo-zoom-pro>

3. Determine the path to the image.

export deafult{
  data(){
    return {
      loaded: false,
      imgSrc: '/path/to/image/'
    }
  },
  created(){
    const img = new Image()
    img.src = imgSrc
    img.addEventListener('load', ()=>{
      this.loaded = true
    })
  }
}

4. Component props available.

highUrl: {
  type: String,
  default: ''
},
width: {
  type: Number,
  default: 168
},
height: {
  type: Number,
  default: -1
},
type: {
  type: String,
  default: 'square',
  validator: function (value) {
    return ['circle', 'square'].indexOf(value) !== -1
  }
},
scale: {
  type: Number,
  default: 2
},
enterEvent: {
  type: [Object, UIEvent],
  default: null
},
moveEvent: {
  type: [Object, UIEvent],
  default: null
},
leaveEvent: {
  type: [Object, UIEvent],
  default: null
},
selector: {
  type: Boolean,
  default: true
},
outZoomer: {
  type: Boolean,
  default: false
},
disabledReactive: {
  type: Boolean,
  default: false
},
disabled: {
  type: Boolean,
  default: false
},
mask: {
  type: Boolean,
  default: false
},
maskColor: {
  type: String,
  default: ''
}

props

Prop NameTypeDefaultNote
high-urlString Clearer picture URL
scaleNumber2magnification
disabledBooleanfalsedisabled move
widthNumber166The width of the magnified area
heightNumber-1The height of the magnified area
typeStringsquaremagnifying glass type (circle, square)
selectorBooleantrueshow or remove the selector
out-zoomerBooleanfalseamplification region will be displayed on the outside
maskBooleanfalseshow mask
mask-colorColorrgba(0,0,0,0.4)mask color
enter-eventObject/UIEventnullcustom enter event
move-eventObject/UIEventnullcustom move event
leave-eventObject/UIEventnullcustom leave event
disabled-reactiveBooleanfalseDisable listening for internal element info changes

Slot

Slot NameNote
defaultdefault slot
selectorselector slot
zoomerinner zoomer slot
outzoomerout zoomer slot

Event

Event NameNotevalue
createdcreated event 
mouseentermouse enter event 
mousemovemouse move event 
mouseleavemouse leave event 

Methods

Method NameNotevalue
updateupdate

Magnifying Glass Effect In Vue, vue photo zoom pro Plugin/Github, javascript canvas magnifier


See Demo And Download

Official Website(mater1996): Click Here

This superior jQuery/javascript plugin is developed by mater1996. For extra advanced usage, please go to the official website.

Related Posts

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…

alert-confirm-prompt-attention-js

Simple Alert, Confirm, Prompt Popup Using Vanilla JavaScript Library | attention.js

JavaScript provides various built-in functionality to display popup messages for different purposes. Attention JS is a vanillaJS plugin used to create a custom alert, confirm, or Prompt…

Bootstrap-4-Sidebar-Menu-Responsive-Template

Bootstrap 4 Sidebar Menu Responsive Template | MDB

Bootstrap Side Navbar – Responsive sidebar template based on the Bootstrap 4 framework. An easy-to-use, totally responsive, Google Material Design impressed aspect navigation for modern web app…

Bootstrap-4-Toast-Notification-Plugin

Lightweight Bootstrap 4 Toast Notification Plugin | BS4 Advanced Toast

A lightweight Bootstrap 4 Toast Notification plugin integrated with JS/jQuery. bs4-toast.js is a JavaScript library that enhances the native Bootstrap toast component with icons, buttons, callbacks, and…

Audio-Visualizations-Wave

How to Create Audio Visualizations with JavaScript | Wave.js

Audio Visualizer Library – wave.js is a vanilla javascript audio visualization library that provides 20+ creative audio visualization effects to bring more engagement to your visitor. Contribute…

bootstrap-5-treeview

Bootstrap 5 Treeview Dynamically Collapsible | bs5treeview

Bootstrap 5 Tree View is a very simple plug-in for creating a basic and elegant Treeview using BS5. For use with Bootstrap 5, the attributes have been…

Leave a Reply

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