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.
|Description||This attribute defines the alternative text describing the image. Users will see this text displayed if the image URL is wrong, the image is not in one of the supported formats, or if the image is not yet downloaded.|
|Description||The image URL. This attribute is mandatory for the |
|Emitted when the img fails to load|
|Emitted when the image has finished loading|
|Emitted when the img src has been set|
No public methods available for this component.
CSS Shadow Parts
|The inner |
CSS Custom Properties
No CSS custom properties available for this component.
No slots available for this component.