vue-lazy-list

Tiny vue component to lazy load your list items.
3,137
Install
npm install vue-lazy-list
Latest Version:1.0.4
Vue:3
License:MIT*
Last Updated:Sep 29, 2021
Links: npm
Maintainer: dapotatoman

Vue Lazy List

Lazily load your list! Supports only Vue 3

🚀 Features

  • ⚡ Ultra-fast & Lightweight: ~1.3kB when minified/gzipped, see bundle stats.
  • 🦾 Type Strong: Written in Typescript, with TS Docs.
  • 🔋 Automatic Unload: Invisible elements are unloaded.

📦 Install

npm i vue-lazy-list

🦄 Usage

<template>
  <LazyList v-slot="{ data, index }" :dataset="list" :initial-items="15" :buffer="5">
    <LazyListItem :unrender-delay="3000" :min-height="50" class="item-wrapper">
      {{ data }}
    </LazyListItem>
  </LazyList>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import { LazyList, LazyListItem } from 'vue-lazy-list';

const list = ref([...Array(10000).keys()]);
</script>

Note: Always apply margin styles on the item wrapper to accurately calculate height.

📄 License

MIT License © 2021-PRESENT dapotatoman

Related Packages

vue2-siema

Vue component for siema

22,729
v-datatable-light

A lightweight vue datatable component with no dependencies

14,662 52
vue-toggle-component

vue-toggle-component makes an ease to use, lightweight and highly customizable t...

12,610 11
vue-advanced-cropper

The advanced library to create your own croppers suited for any website design

11,636,664 1,186
@zemkogabor/vue-form-validator

A lightweight Vue.js library that implements the JavaScript Constraint Validatio...

4,470

Version History

Version Released Vue License
1.0.4 >=3.2.18 MIT*
1.0.3 >=3.2.18 MIT*
1.0.2 >=3.2.18 MIT*
1.0.1 >=3.2.18 MIT*
1.0.0 ^3.2.11