Demos
With Loading Spacer
Creates a loading spacer, based on an aspect ratio generated by the width and height, to prevent cumulative layout shift.
- CodeSandbox:
Responsive Images
Loads responsive images based on screen size. Accepts default srcset and sources (with srcset, media, type).
- CodeSandbox:
With Lazy Load
Lazy loads the image to improve page speed. This example uses vanilla-lazyload but vue3-lazyload should work as well.
- CodeSandbox:
With Swiper
Zoom in on photos in a Swiper carousel. To avoid any conflicting touch events, recommended with fullscreenOnMobile
.
- CodeSandbox: