naver/egjs-infinitegrid — 2.4k★ on GitHub (TypeScript). A module used to arrange card elements including content infinitely on a grid layout.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
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
✨ Features
Use it in a framework you like.
We supports all major JS frameworks like React, Vue, Angular
Restore state like position and active slide with persist
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();
Use Faster & Lazy Rendering
When the loading="lazy" or data-grid-lazy="true"(external lazy loading) attribute is used, Rendering of the items occurs immediately. When items are loaded, they are rendered sequentially.
If you use data-grid-width and data-grid-height attributes, the size of self, child image, and video elements is automatically adjusted until loading is complete.
InfiniteGrid calculates the size of container and children by window resizing event. However, even if the size of the window does not change, the size of the event container and children can change. Most of the first rendering issues are also like this.
In this case, I recommend ResizeObserver for you.
Provides useResizeObserver option to detect size change of container and observeChildren option to detect size change of children.
Pre-guess size for performance or invisible items.
What if all items were the same size?
If you use the isEqualSize option, all items are considered to be the same size.
Each resize only calculates the size of one item.
Add data-grid-not-equal-size="true" attribute if there is an exceptional item whose size needs to be calculated while using isEqualSize.
<div class="item item1"></div>
<div class="item item1"></div>
<div class="item item1"></div>
<!--item2 is a different size than item1.-->
<div class="item item2" data-grid-not-equal-size="true"></div>
What if a size group exists?
isEqualSize assumes all items are equal. But if there are more than two size-groups, use data-grid-size-group.
<!--item1 has the same size.-->
<div class="item item1" data-grid-size-group="1"></div>
<div class="item item1" data-grid-size-group="1"></div>
<!--item2 has the same size.-->
<div class="item item2" data-grid-size-group="2"></div>
<div class="item item2" data-grid-size-group="2"></div>
What if all items don't change size?
If all items do not have a constant size, use the isConstantSize option. Resizing doesn't calculate the item's size.
If you want to recalculate, use .updateItems(items, { useOrgResize: true }) method or .renderItems({ useOrgResize: true }) method.
📦 Packages
Package
Version
Description
@egjs/infinitegrid
Vanilla Module of InfiniteGrid
@egjs/ngx-infinitegrid
Angular port of @egjs/infinitegrid
@egjs/react-infinitegrid
React port of @egjs/infinitegrid
@egjs/vue-infinitegrid
Vue.js@2 port of @egjs/infinitegrid
@egjs/vue3-infinitegrid
Vue.js@3 port of @egjs/infinitegrid
@egjs/svelte-infinitegrid
Svelte port of @egjs/infinitegrid
🌐 Supported Browsers
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/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.
How active is development on naver/egjs-infinitegrid?
The most recent commit recorded on naver/egjs-infinitegrid was 4 months ago, based on the GitHub push timestamp. The repository has 97 forks — one of the better signals of community interest.
How many stars does naver/egjs-infinitegrid have?
naver/egjs-infinitegrid has 2.4k GitHub stars — refresh the page for the live number, or check github.com/naver/egjs-infinitegrid. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is naver/egjs-infinitegrid open source?
Yes — naver/egjs-infinitegrid ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/naver/egjs-infinitegrid.
What else is in the Frontend space?
naver/egjs-infinitegrid is tracked by TopGit under the Frontend category, alongside 12 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What topics is naver/egjs-infinitegrid associated with?
Where can I see naver/egjs-infinitegrid in action?
The project maintains a homepage at https://naver.github.io/egjs-infinitegrid/. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about naver/egjs-infinitegrid?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/naver/egjs-infinitegrid is the definitive source.
Read full README in the tab above.
Want a second opinion on egjs-infinitegrid?
Ask an AI that can read this page — one click and you get its take on egjs-infinitegrid.