
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.
vue3-compare-image
Advanced tools
A Vue 3 component to compare and slide between two images, supports vertical and horizontal modes, and Keyboard for accessibility.
Vue 3 component for before/after image comparison with drag, hover mode, keyboard navigation, and vertical or horizontal layouts.
This project is a Vue 3-focused fork of vue-compare-image, with behavior parity improvements inspired by react-compare-image.
ArrowLeft, ArrowRight, ArrowUp, ArrowDown)docs/getting-started.mddocs/api-reference.mddocs/examples.mdpnpm add vue3-compare-image
# or
npm i vue3-compare-image
# or
yarn add vue3-compare-image
import { createApp } from 'vue'
import VueCompareImage from 'vue3-compare-image'
import App from './App.vue'
createApp(App).use(VueCompareImage).mount('#app')
<script setup lang="ts">
import { VueCompareImage } from 'vue3-compare-image'
</script>
<template>
<VueCompareImage
left-image="/before.jpg"
right-image="/after.jpg"
/>
</template>
/// <reference types="vue3-compare-image/client" />
| Prop | Type | Default | Description |
|---|---|---|---|
leftImage (required) | string | - | Left image URL |
rightImage (required) | string | - | Right image URL |
vertical | boolean | false | Use vertical comparison mode |
keyboard | boolean | false | Enable keyboard navigation |
keyboardStep | number | 0.01 | Slider step per keyboard press |
aspectRatio | 'taller' | 'wider' | 'wider' | Aspect ratio strategy |
handle | string | number | boolean | undefined | Custom handle markup |
handleSize | number | 40 | Handle size in px |
hover | boolean | false | Move slider with hover/mousemove |
slideOnClick | boolean | true | Move slider on click/tap |
leftImageAlt | string | '' | Left image alt text |
rightImageAlt | string | '' | Right image alt text |
leftImageCss | Record<string, string> | {} | Inline styles for left image |
rightImageCss | Record<string, string> | {} | Inline styles for right image |
leftImageLabel | string | undefined | Left image label |
rightImageLabel | string | undefined | Right image label |
skeleton | string | number | boolean | undefined | Loading placeholder HTML |
sliderLineColor | string | '#ffffff' | Slider line color |
sliderLineWidth | number | 2 | Slider line width in px |
sliderPositionPercentage | number | 0.5 | Initial slider position from 0 to 1 |
onSliderPositionChange | (position: number) => void | undefined | Callback on slider position updates |
slideStart(position: number)slideEnd(position: number)isSliding(state: boolean)pnpm install
pnpm dev
pnpm lint
pnpm typecheck
pnpm test:run
pnpm coverage
pnpm build
pnpm docs:build
Please read CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md before contributing.
FAQs
A Vue 3 component to compare and slide between two images, supports vertical and horizontal modes, and Keyboard for accessibility.
The npm package vue3-compare-image receives a total of 517 weekly downloads. As such, vue3-compare-image popularity was classified as not popular.
We found that vue3-compare-image 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.