@fifteen/design-system-vue
Version:
Vue 3 (Composition API + Typescript) implementation of the Fifteen Design System
11 lines (10 loc) • 358 B
TypeScript
import { Ref } from 'vue';
/**
* Composable that tracks image presence on viewport and, when visible, its loading status
* @param templateRef - Element template ref
* @param imageSrc - Source of the image
*/
export declare function useLazyImage(templateRef: Ref<HTMLElement>, imageSrc: string): {
isInit: Ref<boolean>;
isLoaded: Ref<boolean>;
};