npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-image-zooom

v1.4.1

Published

[![react-image-zooom](https://nodei.co/npm/vue-image-zooom.png)](https://www.npmjs.com/package/vue-image-zooom)

Readme

Logo-ImageZooom Image-Zooom a Vue3 Component

react-image-zooom

Simple Vue3 component that will allow users to zoom in on your images, perfect for product images and galleries!

Small and light weight Vue port of React-Image-Zooom component.

npm version https://img.shields.io/github/issues-raw/mario-duarte/vue-image-zooom

Buy me a coffee to keep me going!

How it works?

This component has a very minimal styling footprint only setting the minimum to make it work, and you can extend the styling to fit your needs.

For extra customization this component it will also add extra classes dynamically depending on its state.

It will have the class loading while the image is been preloaded and loaded once it has been loaded.

Additionally it will have the class fullview while the user has not initiated the zoom and zoomed once the user has taped/clicked in.

On touch enabled devices users can use one finger to zoom in and move the zoom location by dragging the finder on the image, this will disable the scrolling. Touching with more than 1 finger on the image will not activate the zoom and page will scroll as normal, this was decided this way as it is easier to use one finger to zoom and drag on the image.

v1.4.0

Change log:

  • Fixed issue where dynamicly changing the src attribute in the component would not cause the component to re-render due to the props of the ImageZooom been destructured and losing the ref status.

v1.3.0

Change log:

  • Passing attributes properly down to the figure tag using useAttrs
  • Clarified fullWidth behavior: when fullWidth is true the zoom fits the image’s natural width to the container, it does not upscale images smaller than the container and will fall back to the provided zoom value.
  • Sizing and defaults
    • width/height props accept string | number and are normalized in image-zooom.vue (numbers become px; empty strings fall back to 100%/auto). The rendered <img> uses width: 100%; height: auto; inside the figure.

V1.2.0

Change log:

  • Renamed the package from VueImageZooom to ImageZooom and updated documentation.

How to use

You can register the component globally as a plugin or import it directly into your components.

1. Install

npm i vue-image-zooom

2. Global Registration

In your main entry file (e.g., main.ts):

import { createApp } from 'vue'
import App from './App.vue'
import ImageZooom from 'image-zooom'

const app = createApp(App)

app.use(ImageZooom)
app.mount('#app')

Then you can use it anywhere in your application:

<template>
  <ImageZooom 
    src="path/to/your/image.jpg" 
    alt="A beautiful image" 
    :width="400"
    zoom="200%"
  />
</template>

3. Local Registration

Import the component directly into your Vue component:

<script setup lang="ts">
import { ImageZooom } from 'vue-image-zooom';
</script>

<template>
  <ImageZooom 
    src="path/to/your/image.jpg" 
    alt="A beautiful image" 
    fullWidth
  />
</template>

Props

| Prop | Type | Default | Description | |-------------------|---------------------------|---------------------------------------|-----------------------------------------------------------------------------| | src | string | Required | The source URL of the image to display. | | alt | string | 'This is an imageZoom image' | The alt text for the image. | | zoom | string \| number | '200' | The zoom level as a percentage (e.g., '200%') or a number. | | width | string \| number | '100%' | The width of the component container. | | height | string \| number | 'auto' | The height of the component container. | | fullWidth | boolean | false | If true, the zoom level is calculated to fit the image's natural width. | | id | string | undefined | A custom ID for the figure element. A unique ID is generated if not provided. | | errorMessage | string | 'There was a problem...' | Custom message to display if the image fails to load. | | onErrorCallback | (error: Event) => void | undefined | A callback function that fires when the image fails to load. |