1.0.2 • Published 6 years ago

vue-fade-images v1.0.2

Weekly downloads
17
License
MIT
Repository
github
Last release
6 years ago

vue-fade-images

Lightweight, easy to configure component for displaying a sequence of alternating image files.

Install

Install using npm

npm install vue-fade-images

ES6/commonjs import

// ES6
import {FadeImages} from 'vue-fade-images';

// commonjs
var Swipe = require("vue-fade-images").fadeImages;

Usage

After installation the module can be used as follows:

<template>
  <div>
    <fade-images :delay="2000" :width="400" :height="400"
                :images="images" />
  </div>
</template>

<script>
import FadeImages from '/vue-fade-images'

export default {
  data () {
    return {
      images: [
        {src: require("@/assets/img_1.png") },
        {src: require("@/assets/img_2.png") },
        {src: require("@/assets/img_3.png") }
      ]
    }
  },
  components: {
    FadeImages
  }
}
</script>

Options

OptionDescription
delayNumber (default: 1000) in milliseconds
widthNumber (default: 200) in px
heightNumber (default: 200) in px
imagesArray , array of image sources

Built With