@egjs/vue-infinitegrid

A Vue component that can arrange items infinitely according to the type of grids
8,213 2,363
Install
npm install @egjs/vue-infinitegrid
Latest Version:4.13.0
Vue:2 · 3
Last Updated:Apr 14, 2026
Links: GitHub  ·  npm
Maintainer: ajaxpf

⚙️ Installation

npm install --save @egjs/vue-infinitegrid

❗ Changes from @egjs/infinitegrid

  • All camelCased event names became kebab-case
    • e.g., requestAppend => request-append
  • You can't use methods that manipulates DOM directly
    • e.g., append(), prepend(), insert(), remove()

🏃 Quick Start

<template>
  <masonry-infinite-grid
    class="container"
    v-bind:gap="5"
    v-on:request-append="onRequestAppend"
  >
    <div
      class="item"
      v-for="item in items"
      :key="item.key"
      :data-grid-groupkey="item.groupKey"
    >
      ...
    </div>
  </masonry-infinite-grid>
</template>
<script lang="ts">
import { MasonryInfiniteGrid } from "@egjs/vue-infinitegrid";

export default {
  components: {
    MasonryInfiniteGrid,
  },
  data() {
    return {
      items: this.getItems(0, 10),
    };
  },
  methods: {
    getItems(nextGroupKey: number, count: number) {
      const nextItems: any[] = [];

      for (let i = 0; i < count; ++i) {
        const nextKey = nextGroupKey * count + i;

        nextItems.push({ groupKey: nextGroupKey, key: nextKey });
      }
      return nextItems;
    },
    onRequestAppend(e) {
      const nextGroupKey = (+e.groupKey! || 0) + 1;

      this.items = [...this.items, ...this.getItems(nextGroupKey, 10)];
    },
  },
};
</script>

🙌 Contributing

See CONTRIBUTING.md.

📝 Feedback

Please file an Issue with label "Vue".

📜 License

egjs-infinitegrid is released under the MIT license.

Copyright (c) 2015-present NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Related Packages

@egjs/vue3-infinitegrid

A Vue3 component that can arrange items infinitely according to the type of grid...

40,194 2,363
@egjs/vue-grid

A Vue component that can arrange items according to the type of grids

15,087 318
@masonrygrid/vue

Masonry grid component for Vue

400 0
@zhaomushan/waterfall

Vue 3 masonry waterfall layout with responsive columns

211
vue-masonry

masonry layout for vue.js

550,378 687

Version History

Version Released License
4.13.0
4.12.0
4.11.1
4.11.0
4.10.1
Pre-releases (3)
Version Released License
4.2.0-beta.0
3.0.4-rc MIT
3.0.0-beta MIT