@egjs/infinitegrid

A module used to arrange elements including content infinitely according to grid type. With this module, you can implement various grids composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the

Stats

StarsIssuesVersionUpdatedCreatedSize
@egjs/infinitegrid
87684.0.08 days ago4 years agoMinified + gzip package size for @egjs/infinitegrid in KB

Readme

InfiniteGrid Logo
@egjs/infinitegrid

version npm bundle size (scoped) Travis (.org) Coveralls github GitHub

Angular React Vue Preact Svelte

Demo / Documentation / Other components

A module used to arrange elements including content infinitely according to grid type. With this module, you can implement various grids composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance
📱💻🖥

Supported Frameworks
AngularJS   React   Vue.js   Svelte


✨ Features

  • Use it in a framework you like.
    • We supports all major JS frameworks like React, Vue, Angular
  • SSR(Server Side Rendering) ready
    • You can use inifinitegrid at your favorite SSR frameworks like Next.js or Nuxt.js.
  • Circular(Loop) Mode
  • Ready-to-use plugins you can grab right away.
    • Autoplay, Fade effect, Parallax effect, ...
  • Restore state like position and active slide with persist
  • You can make native-scroll like UI with bound and moveType: freeScroll
  • Supports both Desktop & Mobile
  • Rich API
  • Supports IE9+ with the polyfill

⚙️ Installation

npm

$ npm install --save @egjs/infinitegrid

CDN

🏃 Quick Start

HTML

<div class="container"></div>

ES Modules

import { MasonryInfiniteGrid } from "@egjs/infinitegrid";

const ig = new MasonryInfiniteGrid(".container", { gap: 5 });

With CDN

<!-- Packaged with all dependencies -->
<!-- https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.min.js -->
<script src="https://unpkg.com/@egjs/infinitegrid/dist/infinitegrid.min.js"></script>
var ig = new InfiniteGrid.MasonryInfiniteGrid(".container", { gap: 5 });
import { MasonryInfiniteGrid } from "@egjs/infinitegrid";

function getItems(nextGroupKey, count) {
  const nextItems = [];

  for (let i = 0; i < count; ++i) {
    const num = nextGroupKey * count + i;
    nextItems.push(`<div class="item"></div>`);
  }
  return nextItems;
}
const ig = new MasonryInfiniteGrid(".container", {
  gap: 5,
});

ig.on("requestAppend", (e) => {
  const nextGroupKey = (+e.groupKey || 0) + 1;

  ig.append(getItems(nextGroupKey, 10), nextGroupKey);
});
ig.renderItems();

📦 Packages

Package Version Description
@egjs/ngx-infinitegrid version Angular Angular port of @egjs/infinitegrid
@egjs/react-infinitegrid version React React port of @egjs/infinitegrid
@egjs/vue-infinitegrid version Vue.js Vue.js@2 port of @egjs/infinitegrid
@egjs/vue3-infinitegrid version Vue.js Vue.js@3 port of @egjs/infinitegrid
@egjs/svelte-infinitegrid version Svelte Svelte port of @egjs/infinitegrid

🌐 Supported Browsers

IE Chrome Firefox Safari iOS Android
9+(With polyfill), 11+ for Angular & Svelte Latest Latest Latest 7+ 4+

📼 Demos

Check our Demos.

📖 Documentation

See Documentation page.

🙌 Contributing

See CONTRIBUTING.md.

📝 Feedback

Please file an Issue.

🛣️ Roadmap

See our Roadmap.

📜 License

@egjs/inifinitegrid 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.

      

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.