Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.45 KB

File metadata and controls

46 lines (31 loc) · 1.45 KB
title ion-img

import Props from '@ionic-internal/component-api/v8/img/props.md'; import Events from '@ionic-internal/component-api/v8/img/events.md'; import Methods from '@ionic-internal/component-api/v8/img/methods.md'; import Parts from '@ionic-internal/component-api/v8/img/parts.md'; import CustomProps from '@ionic-internal/component-api/v8/img/custom-props.mdx'; import Slots from '@ionic-internal/component-api/v8/img/slots.md';

<title>ion-img: Img Tag to Lazy Load Images in Viewport</title>

import EncapsulationPill from '@components/page/api/EncapsulationPill';

Img is a tag that will lazily load an image whenever the tag is in the viewport. This is extremely useful when generating a large list as images are only loaded when they're visible. The component uses Intersection Observer internally, which is supported in most modern browsers, but falls back to a setTimeout when it is not supported.

Basic Usage

import Basic from '@site/static/usage/v8/img/basic/index.md';

Properties

Events

Methods

CSS Shadow Parts

CSS Custom Properties

Slots