Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.26 KB

README.md

File metadata and controls

50 lines (39 loc) · 1.26 KB

ImgComparisonSlider

npm package

Vue3 wrapper for img-comparison-slider component.

Refer to this doc for Vue2 support.

Usage examples: https://img-comparison-slider.sneas.io/examples.html

Example

Installation

npm install --save @img-comparison-slider/vue

Usage

<template>
  <ImgComparisonSlider>
    <!-- eslint-disable -->
    <img
      slot="first"
      style="width: 100%"
      src="https://img-comparison-slider.sneas.io/demo/images/before.webp"
    />
    <img
      slot="second"
      style="width: 100%"
      src="https://img-comparison-slider.sneas.io/demo/images/after.webp"
    />
    <!-- eslint-enable -->
  </ImgComparisonSlider>
</template>

<script>
import { ImgComparisonSlider } from '@img-comparison-slider/vue';

export default {
  name: 'ExampleComponent',
  components: {
    ImgComparisonSlider,
  },
};
</script>