vue-zoom-img
v1.0.2
Published
Show image zoom on selected event (click, hover, etc)
Downloads
10,830
Readme
vue-zoom-img
Vue Zoom Img is a VueJS & NuxtJS drective to display a preview of a picture
Demo
npm install vue-zoom-img
# Or yarn add vue-zoom-img
How to use it
<template>
<div>
<img
src="<PATH_OF_YOUR_PICTURE>"
v-zoom-img="<PATH_OF_YOUR_PICTURE>"
/>
<img
src="<PATH_OF_YOUR_PICTURE>"
v-zoom-img="{
src: <PATH_OF_YOUR_PICTURE>,
alt: '<ALT_STRING_VALUE>',
disabled: <TRUE_OR_FALSE>,
blur: <TRUE_OR_FALSE>,
scale: <TRUE_OR_FALSE>
}"
/>
</div>
</template>
<script>
import VueZoomImg from 'vue-zoom-img'
export default {
directives: {
'zoom-img': VueZoomImg
}
}
</script>