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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i ractive-lazyload-img

Weekly Downloads

0

Version

1.0.1

License

WTFPL

Last publish

Collaborators

  • tehshrike