
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vue-zoomable
Advanced tools
Tiny and high performance zoom and pan library for Vue 3. It uses CSS Transforms which provides hardware acceleration.
Tiny and high performance zoom and pan library for Vue 3. It uses CSS Transforms which provides hardware acceleration.
Checkout the demos.
ScrollOverlay component to lock pan/zoom while scrollingnpm install vue-zoomable
Immediate child of VueZoomable must be either svg or an html container.
<template>
<VueZoomable
style="width: 500px; height: 500px; border: 1px solid black"
selector="#myContent"
:minZoom="0.5"
:maxZoom="3"
>
<svg>
<g id="myContent">
<circle x="10" y="10" r="50" />
</g>
</svg>
</VueZoomable>
</template>
<script setup lang="ts">
import VueZoomable from "vue-zoomable";
import "vue-zoomable/dist/style.css";
</script>
| Name | type | default | Description |
|---|---|---|---|
| selector | string | * > * | Root element to apply transform on. Preferrably an id on <div> or <g> tag |
| maxZoom | number | 3 | Maximum allowed zoom |
| minZoom | number | 0.5 | Minimum allowed zoom |
| dblClickZoomStep | number | 0.4 | Step size for zoom on double click |
| wheelZoomStep | number | 0.2 | Step size for zoom on wheel |
| panEnabled | boolean | true | Enable panning |
| zoomEnabled | boolean | true | Enable zoom |
| mouseEnabled | boolean | true | Enable mouse events |
| touchEnabled | boolean | true | Enable touch events |
| dblClickEnabled | boolean | true | Zoom on double click enabled |
| wheelEnabled | boolean | true | Zoom on mouse enabled |
| initialZoom | number | 0.5 | (Deprecated) Initial zoom value. Use v-model:zoom |
| initialPanX | number | 0 | (Deprecated) Initial pan along x-axis. Use v-model:pan |
| initialPanY | number | 0 | (Deprecated) Initial pan along y-axis. Use v-model:pan |
| enableControlButton | boolean | true | Enable or disable control buttons |
| buttonPanStep | number | 15 | Step size for pan on control buttons |
| buttonZoomStep | number | 0.1 | Step size for pan on control buttons |
| zoomOrigin | string | content-center | Possible values, content-center: Scale the content w.r.t its centercenter: Scale the content w.r.t center of the container pointer: Scale the content w.r.t position of the pointer |
All events have argument of type ZoomableEvent.
| Field | Type | Description |
|---|---|---|
| zoom | number | Current zoom value |
| pan | object | Current pan value and delta change in case of panned event. |
| type | string | Source type which triggered the event. dblClick, mouse, touch, wheel or control-btn. |
Sample event data:
{
"zoom": 0.3,
"pan": {
"x": 100,
"y": 2,
"deltaX": 0,
"deltaY": 2
},
"type": "mouse"
}
Prevents mistaken zoom/pan while scrolling the page using mouse wheel or touchscreen. Useful if your zoomable content is embedded within scrollable content. Google map provides similar functionality Google.
| Name | type | default | Description |
|---|---|---|---|
| wheelUnlockKey | string | Control | Wheel is disabled, until the corresponding Key is pressed. You can set it to any value of event.key. see here |
| enableWheelLock | boolean | true | When true, zoom using wheel is disabled until wheelUnclockKey is pressed. |
| enableTouchLock | boolean | true | When true, pan or zoom requires touch using two fingers. |
Contributions are most welcome. Please follow the below steps for any contributions.
fix: #<issue number> <short message> in your PR title (e.g.fix: #3899 update entities encoding/decoding).The setup is pretty easy. You need to have pnpm installed.
# install the dependencies
pnpm i
# start the dev thingie
pnpm run dev
A good way to start is to find an issue labeled as bug, help wanted or feature request and suggest your approach in comments.
Other ways to help:
FAQs
Tiny and high performance zoom and pan library for Vue 3. It uses CSS Transforms which provides hardware acceleration.
The npm package vue-zoomable receives a total of 2,663 weekly downloads. As such, vue-zoomable popularity was classified as popular.
We found that vue-zoomable demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.