Skip to content

MazLazyImg

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

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

<template>
  <MazLazyImg src="https://placedog.net/1000/1000" block />
</template>

Props

NameDescriptionTypeRequiredDefault
styleThe style of the componentNative typeNoundefined
classThe class of the componentNative typeNoundefined
srcThe source of the imagestring | Image | nullNoundefined
altThe alt of the imagestringNoundefined
hide-loaderRemove the loaderbooleanNoundefined
observer-onceRemove the observer once the image is loadedbooleanNotrue
load-onceRemove the observer once the image is loadedbooleanNoundefined
image-height-fullMake the image height fullbooleanNoundefined
observer-optionsThe options of the observerNative typeNoundefined
fallback-srcThe fallback src to replace the src on loading errorstringNoundefined
img-classThe classes of the image elementNative typeNoundefined
blockThe image will be displayed in full widthbooleanNoundefined

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