Socket
Socket
Sign inDemoInstall

@webharmony/web-lazy-img

Package Overview
Dependencies
2
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webharmony/web-lazy-img

Custom element for handle lazy load images with placeholder img and blur effect


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

web-lazy-img

Lazy load images element build with lit-element. Component uses IntersectionObserver.

Usage

Install component via npm or download bundled file (in future will be cdn)

npm i @webharmony/web-lazy-img
<web-lazy-img preload='images/1-preload.jpg' src="images/1.png"></web-lazy-img>

Properties

preload: String;

Url adress from low res tiny image that will be placeholder and blured

src: String;

Url for proper image

srcset: String;

Set of url for multiple images

sizes: String;

Set of media queries that defines the size the img should be according to a set of media conditions

alt: String;

Defines alt img property

width: String;

Defines with of image, default value is 100%

heigth: String;

Defines heigth of image, default value is 100%

Private properties

isVisible: Boolean;

loaded: Boolean;

FAQs

Last updated on 24 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc