Vue Quick Preview

A lightweight lightbox.

Demo

Install

npm i --save vue-quick-preview

Usage






 




 






<template>
  <img src="https://placeimg.com/400/400/any" @click="onImageClick" />
</template>

<script>
import preview from 'vue-quick-preview';

export default {
  methods: {
    onImageClick(e) {
      const instance = preview(e.target);
      console.log(instance);
    },
  },
};
</script>

MIT Licensed | Copyright © 2021-present varHarrie