https://github.com/openforge/web-components
Open source, shareable and reusable web components
https://github.com/openforge/web-components
Last synced: 3 months ago
JSON representation
Open source, shareable and reusable web components
- Host: GitHub
- URL: https://github.com/openforge/web-components
- Owner: openforge
- Created: 2018-08-07T15:56:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-09T11:40:40.000Z (over 7 years ago)
- Last Synced: 2025-10-27T20:42:08.828Z (5 months ago)
- Language: TypeScript
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Official Website |
Opportunities |
Facebook
Leading By Example.
Working with the latest technologies, designing the best products, and sharing our knowledge with the world wide community.
# lazy-img

## What is it?
lazy-img is a web component built with [Stencil](https://stenciljs.com/) that allows you to lazy load images as the user scrolls them into the viewport. On supported browsers (Chrome and chrome based browsers, Firefox and Edge) it uses [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) to accomplish this functionality. For Safari and IE it simply falls back to setTimeout.
## Usage
To use this component in your app, no matter what framework you are using, follow these steps:
- pop this script tag `` into your index.html
## API
Properties:
- src (string): the path or url to the image you want to load
- alt (string): the value you want to use for the alt property of the image https://www.w3schools.com/tags/att_img_alt.asp
## Examples
```
```