vue-zoom-on-hover


!
downloads
!
gziped

Vue.js component that shows the full image or a scaled image in the image area on hover. Forked from
here
Demo
Live demo
Usage
Install package:
``
bash
npm i vue-zoom-on-hover
`
Register the component:
`
js
import ZoomOnHover from "vue-zoom-on-hover";
Vue.use(ZoomOnHover);
``
With cdn:
`
html
`
Use it like this:
`
html
`
All options:
`
html
@loaded="onload" @resized="onresize">
``
Features
* enabled/disabled property
* custom scale for zoomed image
* optionally a separate zoom image
* event when all images loaded
* event when images resized (responsive css, etc)
Caveats
if the parent container is bigger than the source image, the normal image stretches to the size of the parent container but the zoom image will have the original width (will be smaller for example)
Possible enhancements
* support for touch devices