Skip to content

MazLazyImg

MazLazyImg is a standalone component to display images and svgs with lazy loading

INFO

Before you have to import the global css files in your project, follow instructions in Getting Started

vue
<template>
  <MazLazyImg src="https://loremflickr.com/1000/1000" />
</template>

<script setup lang="ts">
  import MazLazyImg from 'maz-ui/components/MazLazyImg'
</script>

Props, Event & Slots

Props

Prop nameDescriptionTypeValuesDefault
styleThe style of the componentTSIndexedAccessType-undefined
classThe class of the componentTSIndexedAccessType-undefined
image
@deprecated Use src instead
union-undefined
srcThe source of the imageunion-undefined
altThe alt of the imagestring-undefined
noPhotoDisplay the fallback imageboolean-
noLoaderRemove the loaderboolean-
noObserverOnceRemove the observer once the image is loadedboolean-
loadOnceRemove the observer once the image is loadedboolean-
imageHeightFullMake the image height fullboolean-
observerOptionsThe options of the observerTSIndexedAccessType-undefined
fallbackSrcThe fallback src to replace the src on loading errorstring-undefined

Events

Event namePropertiesDescription
intersectingEmitted when the image is intersecting
loadingEmitted when the image is loading
loadedEmitted when the image is loaded
errorEmitted when the image is in error

Slots

NameDescriptionBindings
default