All Projects → naver → Egjs Infinitegrid

naver / Egjs Infinitegrid

Licence: mit
A module used to arrange card elements including content infinitely on a grid layout.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Egjs Infinitegrid

svelte-bricks
Naive Svelte Masonry component without column balancing (ragged columns at the bottom)
Stars: ✭ 22 (-97.07%)
Mutual labels:  layout, svelte, masonry
egjs-grid
A component that can arrange items according to the type of grids
Stars: ✭ 188 (-74.97%)
Mutual labels:  grid, layout, masonry
Masonry Layout
An efficient and fast web component that gives you a beautiful masonry layout
Stars: ✭ 43 (-94.27%)
Mutual labels:  layout, grid, masonry
masonry-css
Create mosaic grid, like masonry, with css only
Stars: ✭ 17 (-97.74%)
Mutual labels:  grid, layout, masonry
Shuffle
Categorize, sort, and filter a responsive grid of items
Stars: ✭ 2,170 (+188.95%)
Mutual labels:  layout, grid, masonry
Svelte Grid
A responsive, draggable and resizable grid layout, for Svelte.
Stars: ✭ 473 (-37.02%)
Mutual labels:  layout, grid, svelte
angular-bricklayer
AngularJS module for ademilter's bricklayer, a lightweight & independent cascading grid layout library
Stars: ✭ 42 (-94.41%)
Mutual labels:  grid, layout
CSS-Grid
CSS Grid 레이아웃 모듈 Level 1
Stars: ✭ 21 (-97.2%)
Mutual labels:  grid, layout
visual-portfolio
Portfolio layouts visual editor with Gutenberg support
Stars: ✭ 31 (-95.87%)
Mutual labels:  grid, masonry
vue-smart-widget
🗃️Smart widget is a flexible and extensible content container component for Vue2.x / Vue3.x in Next branch.
Stars: ✭ 110 (-85.35%)
Mutual labels:  grid, layout
svelte-datagrid
Svelte data grid spreadsheet best best features and performance from excel
Stars: ✭ 48 (-93.61%)
Mutual labels:  grid, svelte
grid-layout
grid-layout is a layout engine which implements grid, can use in canvas/node-canvas
Stars: ✭ 43 (-94.27%)
Mutual labels:  grid, layout
gymnast
🤸 Configurable grid and layout engine for React
Stars: ✭ 35 (-95.34%)
Mutual labels:  grid, layout
bootstrap-grid-ms
Missing grid range in Bootstrap 3, micro-small from 480-767px.
Stars: ✭ 34 (-95.47%)
Mutual labels:  grid, layout
vue-layout-system
A pack of Vue components that solve daily layout problems
Stars: ✭ 31 (-95.87%)
Mutual labels:  grid, layout
svelte-grid-responsive
Responsive grid system based on Bootstrap for Svelte
Stars: ✭ 41 (-94.54%)
Mutual labels:  grid, svelte
Fluid-Grid
Fluid, Responsive and Semantic grid for Sass (SCSS) or LESS CSS. Supports any number of columns. Gutter width is defined as percentage, and grids can be nested too.
Stars: ✭ 17 (-97.74%)
Mutual labels:  grid, layout
Flex Layout
Provides HTML UI layout for Angular applications; using Flexbox and a Responsive API
Stars: ✭ 5,705 (+659.65%)
Mutual labels:  layout, grid
React Native Responsive Grid
Bringing the Web's Responsive Design to React Native
Stars: ✭ 369 (-50.87%)
Mutual labels:  layout, grid
Waterfall.js
Tired of use creepy hacks or heavy ways to get a Grid based on Pinterest?
Stars: ✭ 458 (-39.01%)
Mutual labels:  layout, grid

egjs-infinitegrid

npm version Travis CI Coverage Status React Angular Vue Svelte

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

infinitegrid

Documents

Layouts

The InfiniteGrid can use various layouts.

layout

  • GridLayout: The GridLayout is a layout that stacks cards with the same width as a stack of bricks.
  • JustifiedLayout: JustifiedLayout is a layout that the card is filled up on the basis of a line given a size.
  • FrameLayout: FrameLayout is a layout that allows you to place cards in a given frame.
  • SquareLayout: SquareLayout is a layout that places all cards like squares on a checkerboard, and important cards are n times larger.
  • PackingLayout: The PackingLayout is a layout that shows the important cards bigger without sacrificing the weight of the cards.

Benchmark

eg.infiniteGrid benchmark

eg.infiniteGrid benchmark: append item performance with masonry

Packages

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

Download and Installation

Download dist files from repo directly or install it via npm.

Packaged version

Packaged version is not an official distribution. Is just to provide for ease use of 'egjs-infinitegrid'.

Unminified Minified
No Dependency infinitegrid.js (197.9kb) infinitegrid.min.js (53.2kb)
All infinitegrid.pkgd.js (252kb) infinitegrid.pkgd.min.js (66.3kb)
GridLayout infinitegrid.gridlayout.js (193.3kb) infinitegrid.gridlayout.min.js (53.7kb)
JustifiedLayout infinitegrid.justifiedlayout.js (205.2kb) infinitegrid.justifiedlayout.min.js (56.3kb)
FrameLayout infinitegrid.framelayout.js (196.3kb) infinitegrid.framelayout.min.js (54.4kb)
SquareLayout infinitegrid.squarelayout.js (203.4kb) infinitegrid.squarelayout.min.js (56kb)
PackingLayout infinitegrid.packinglayout.js (195.7kb) infinitegrid.packinglayout.min.js (54.6kb)
Parallax parallax.js (13.3kb) parallax.min.js (4kb)

Installation with npm

The following command shows how to install egjs-infinitegrid using npm.

$ npm install @egjs/infinitegrid

How to use

The following code shows how to import InfiniteGrid.

import InfiniteGrid, {GridLayout, JustifiedLayout, ...} from "@egjs/infinitegrid";

// eg.InfiniteGrid
const ig = new InfiniteGrid(".container", {
  // options
  isOverflowScroll: true,
});

// GridLayout, JustifiedLayout, SquareLayout, FrameLayout, PackingLayout ...
ig.setLayout(GridLayout, {
  // layout options
  margin: 5,
});

// If items are already inserted in children, call layout method
ig.layout();

// If you want to add items from top(left) to bottom(right), call append method
ig.append(`<div class="item"></div>`);


// If you want to add items from bottom(right) to top(left), call prepend method
ig.prepend(`<div class="item"></div>`);

Events

See InfiniteGrid events

// If you want to add items infinitely to the bottom(right), use the append event.
ig.on("append", () => {
  ig.append(`<div class="item"></div>`);
});


// If you want to add items infinitely to the top(left), use the prepend event.
ig.on("prepend", () => {
  ig.prepend(`<div class="item"></div>`);
});

// If you want to know when items have been added, use the layoutComplete event.
ig.on("layoutCompete", e => {
  if (e.isLayout) {
    // Fired when items are relocated through the resize event or method
  } else {
    // Fired when items are added
  }
});

Supported Browsers

The following are the supported browsers.

Internet Explorer Chrome Firefox Safari iOS Android
8+ Latest Latest Latest 7+ 2.3+(except 3.x)
  • If you want to use in IE8, please use polyfill.

Dependency

egjs-infinitegrid has the dependencies for the following libraries:

egjs-component
2.0.0+

How to start developing egjs-infinitegrid?

For anyone interested to develop egjs-infinitegrid, follow the instructions below.

Development Environment

1. Clone the repository

Clone the egjs-infinitegrid repository and install the dependency modules.

# Clone the repository.
$ git clone https://github.com/naver/egjs-infinitegrid.git

2. Install dependencies

npm is supported.

# Install the dependency modules.
$ npm install

3. Build

Use npm script to build egjs-infinitegrid

# Run webpack-dev-server for development
$ npm start

# Build
$ npm run build

# Generate jsdoc
$ npm run jsdoc

Two folders will be created after complete build is completed.

  • dist folder: Includes the infinitegrid.js and infinitegrid.min.js files.
  • doc folder: Includes API documentation. The home page for the documentation is doc/index.html.

Linting

To keep the same code style, we adopted ESLint to maintain our code quality. The rules are modified version based on Airbnb JavaScript Style Guide. Setup your editor for check or run below command for linting.

$ npm run lint

Test

Once you created a branch and done with development, you must perform a test running npm run test command before you push code to a remote repository.

$ npm run test

Running a npm run test command will start Mocha tests via Karma-runner.

Bug Report

If you find a bug, please report it to us using the Issues page on GitHub.

License

egjs-infinitegrid is released under the MIT license.

Copyright (c) 2015 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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].