UNPKG

lit-lazy-image

Version:

A Lit Web Component for lazy-loading images with WebP and blur-up placeholder support

24 lines (17 loc) 381 B
# lit-lazy-image A lightweight Lit web component for lazy-loading responsive images with WebP fallback and blur-up placeholder support. ## Installation ```bash npm install lit-lazy-image ``` ## Usage ```js import 'lit-lazy-image'; <lazy-image src="/assets/hero.jpg" placeholder="/assets/hero-blur.jpg" alt="Landing page" width="600" height="400"> </lazy-image> ```