ractive-lazyload-img

1.0.1 • Public • Published

ractive-lazyload-img

A Ractive decorator that lazy-loads images when they get within 200px of the viewport.

Usage

const lazy = require('ractive-lazyload-img')

new Ractive({
	el: '#content',
	template: '#template',
	decorators: {
		lazy
	}
})
<img
	src="/transparent-pixel.png"
	as-lazy="'/path/to/images/' + dynamicImageName"
/>

License

WTFPL

/ractive-lazyload-img/

    Package Sidebar

    Install

    npm i ractive-lazyload-img

    Weekly Downloads

    0

    Version

    1.0.1

    License

    WTFPL

    Last publish

    Collaborators

    • tehshrike