@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Lazy-loading image component.

    The native <img> element's src is only set once the host element enters the viewport, powered by IntersectionObserver. Until then an optional placeholder (CSS shimmer) is shown.

    <ui-image src="photo.jpg" alt="A scenic landscape" />
    <ui-image src="hero.webp" alt="Hero banner" width="800" height="400" />

    Implements

    • OnInit
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    alt: InputSignal<string> = ...

    Alt text forwarded to the native <img> element.

    ariaLabel: InputSignal<string | undefined> = ...

    Accessible label forwarded to the native element as aria-label.

    Falls back to alt when not provided.

    height: InputSignal<number | undefined> = ...

    Explicit height in pixels (sets host element height).

    src: InputSignal<string> = ...

    Image source URL.

    width: InputSignal<number | undefined> = ...

    Explicit width in pixels (sets host element width).

    Methods

    • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

      Returns void