Vue Photo Zoom Pro

3.0.1 · active · verified Sun Apr 19

Vue Photo Zoom Pro is a Vue.js component designed to provide image magnification functionality, enabling users to zoom into specific regions of a picture. It supports both Vue 2 and Vue 3 environments; version 3.x is compatible with Vue 3, while Vue 2 projects should explicitly install the 2.x branch. The current stable version is 3.0.1, which includes fixes for common Vue warnings. Key differentiators include its dual Vue version compatibility and customizable options for handling different image resolutions. The library is distributed via npm, requiring a separate import for its CSS styles. Releases are moderately paced, addressing bug fixes and minor features.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to install and integrate the `vue-photo-zoom-pro` component into a Vue 3 Single File Component, including the necessary CSS import.

<template>
  <vue-photo-zoom-pro :url="imgUrl" :high-url="imgHighUrl"></vue-photo-zoom-pro>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import vuePhotoZoomPro from 'vue-photo-zoom-pro';
import 'vue-photo-zoom-pro/dist/style/vue-photo-zoom-pro.css';

export default defineComponent({
  components: {
    vuePhotoZoomPro,
  },
  setup() {
    const imgUrl = 'https://via.placeholder.com/600x400/0000FF/FFFFFF?text=LowResImage';
    const imgHighUrl = 'https://via.placeholder.com/1200x800/FF0000/FFFFFF?text=HighResImage';
    return {
      imgUrl,
      imgHighUrl,
    };
  },
});
</script>

view raw JSON →