vue3-lazy-load-component

Vue component for lazy rendering code
492
Install
npm install vue3-lazy-load-component
Latest Version:1.0.1
Vue:3
License:MIT
Last Updated:Jul 17, 2026
Links: GitHub  ·  npm
Maintainer: cobsen

Vue3 Lazy Component

Lazy render Vue component for other Vue components or any code.

This is an adaption of v-lazy-component for Vue 3.5+

Usage

Installation

yarn add vue3-lazy-load-component  # or npm i vue3-lazy-load-component

Global Register

import { createApp } from 'vue'
import App from './App.vue'
import LazyComponent from 'vue3-lazy-load-component'

const app = createApp(App)

app.use(LazyComponent)
app.mount('#app')

Local Register

<script setup>
import LazyComponent from 'vue3-lazy-load-component'
</script>

Usage

<lazy-component wrapper-tag="section" @intersected="optionalDispatch">
  <your-component/>
  
  <!-- Optional -->
  <template #placeholder>
    <span>Loading...</span>
  </template>
</lazy-component>

Props

Name Description Type Default
wrapper-tag Html tag of lazy component String div
root-margin Intersection Observer API doc String 0px 0px 0px 0px
scroll-margin Intersection Observer API doc String 0px 0px 0px 0px
threshold Intersection Observer API doc Number, Array 0
See Intersection Observer API doc

Slots

Name Description
placeholder Content that is shown as a placeholder until it comes into view

Events

Name Description
intersected Dispatched when element becomes visible

πŸ“„ License

MIT

Related Packages

@21cnfe/onekit-mp-cli

ε°η¨‹εΊζ‘†ζžΆεΌ€ε‘ε·₯ε…·

1,063
duplicate-dependencies-webpack-plugin

webpack plugin to find duplicated dependencies from your bundle

332,104 6
@debut/plugin-report

Report generation for strategy backtesting in debut

4,011 18
@amilochau/core-vue3

Core plugin for vue.js (v3) projects

3,802 0
@lg2/nuxt3-plugin-link-resolver

link resolver plugin fro nuxt3

3,544 0

Version History

Version Released Vue License
1.0.1 ^3.5.0 MIT
1.0.0 ^3.5.0 MIT