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 Name | Type | Default | Note |
---|---|---|---|
high-url | String | Clearer picture URL | |
scale | Number | 2 | magnification |
disabled | Boolean | false | disabled move |
width | Number | 166 | The width of the magnified area |
height | Number | -1 | The height of the magnified area |
type | String | square | magnifying glass type (circle, square) |
selector | Boolean | true | show or remove the selector |
out-zoomer | Boolean | false | amplification region will be displayed on the outside |
mask | Boolean | false | show mask |
mask-color | Color | rgba(0,0,0,0.4) | mask color |
enter-event | Object/UIEvent | null | custom enter event |
move-event | Object/UIEvent | null | custom move event |
leave-event | Object/UIEvent | null | custom leave event |
disabled-reactive | Boolean | false | Disable listening for internal element info changes |
Slot
Slot Name | Note |
---|---|
default | default slot |
selector | selector slot |
zoomer | inner zoomer slot |
outzoomer | out zoomer slot |
Event
Event Name | Note | value |
---|---|---|
created | created event | |
mouseenter | mouse enter event | |
mousemove | mouse move event | |
mouseleave | mouse leave event |
Methods
Method Name | Note | value |
---|---|---|
update | update |
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.