Vue lazy img

A component for image lazy loading implements by vuejs

Version: 1.0.0 Updated: 05/04/2017

By: lakb248 License: ISC

Downloads Last 30 Days: 30

Install

npm i vue-lazy-img
yarn add vue-lazy-img

Repository: https://github.com/lakb248/vue-lazy-img

CDNs

bundle.run: https://bundle.run/vue-lazy-img

jsDelivr: https://cdn.jsdelivr.net/npm/vue-lazy-img

unpkg: https://unpkg.com/vue-lazy-img

vue-lazy-img

Build Status

A component for image lazy loading implement by vuejs

Demo

Demo

Usage

Install

npm install vue-lazy-img --save

And, if you are using vue 2.0

npm install vue-lazy-img@next --save

CommonJS

var VueLazyImg = require('vue-ip-input');

new Vue({
    components: {
        'vue-lazy-img': VueLazyImg
    },
    template: '<vue-lazy-img source="..." placeholder="..."></vue-lazy-img>'
});

ES6

import VueLazyImg from 'vue-lazy-img';

new Vue({
    components: {
        'vue-lazy-img': VueLazyImg
    },
    template: '<vue-lazy-img source="..." placeholder="..."></vue-lazy-img>'
});

Props

Property Description
source the source of the image
placeholder the placeholder of the image which will be loaded before the source

License

MIT

Categories: Vue js