UMD Web Elements Library
    Preparing search index...

    Interface LazyImageOptions

    Options for lazy loading image wrapper

    interface LazyImageOptions {
        image: HTMLImageElement;
        onError?: (error: Event) => void;
        onLoad?: () => void;
        onLoadStart?: () => void;
        placeholder?: HTMLElement;
        rootMargin?: string;
        threshold?: number;
        wrapperStyles?: Record<string, any>;
    }
    Index

    Properties

    image: HTMLImageElement

    The image element to lazy load

    onError?: (error: Event) => void

    Callback when image fails to load

    onLoad?: () => void

    Callback when image finishes loading

    onLoadStart?: () => void

    Callback when image starts loading

    placeholder?: HTMLElement

    Optional placeholder element to show while loading

    rootMargin?: string

    IntersectionObserver root margin. Defaults to '50px'

    threshold?: number

    IntersectionObserver threshold. Defaults to 0.1

    wrapperStyles?: Record<string, any>

    Optional custom styles for the wrapper