Skip to content

OrigamLazy ​

<OrigamLazy> defers rendering its default slot until the wrapper element enters the viewport. Once rendered, it stays rendered. A configurable transition wraps the appearing content.

Basic usage ​

vue
<template>
    <OrigamLazy>
        <HeavyComponent />
    </OrigamLazy>
</template>

Controlled visibility ​

Use v-model to read or override whether the content has been revealed.

vue
<template>
    <OrigamLazy v-model="isVisible">
        <MyCard />
    </OrigamLazy>
</template>
PropTypeDefaultDescription
modelValuebooleanfalseWhether the slot content is rendered

Intersection options ​

vue
<template>
    <OrigamLazy :options="{ rootMargin: '200px', threshold: 0.1 }">
        <MyComponent />
    </OrigamLazy>
</template>
PropTypeDefaultDescription
optionsIntersectionObserverInit{}IntersectionObserver configuration

Dimension ​

PropTypeDescription
heightstring | numberReserve height before content loads (prevents layout shift)
widthstring | numberReserve width

Transition ​

PropTypeDefaultDescription
transitionTTransitionPropsOrigamFadeTransition used when content appears

Tag ​

PropTypeDefaultDescription
tagstring'div'Wrapper HTML element

Slots ​

SlotDescription
defaultContent that is lazily rendered

Emits ​

EventPayloadDescription
update:modelValuebooleanFires when the content becomes visible

Design tokens ​

OrigamLazy does not define component-level tokens. Style the wrapper via class or style props.