@egjs/vue-grid

中文文档
1.18.1发布于 2026/10/30TypeScriptESM + CJS近 30 天下载 5430

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

原始使用文档
文档目录8 节
  1. Vue Grid
  2. Grids
  3. Documents
  4. Download and Installation
  5. How to use
  6. 3. npm start
  7. Bug Report
  8. License

Vue Grid

npm version     

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

Demo /  API

Grids

MasonryGridJustifiedGridFrameGridPackingGrid
  • MasonryGrid: The MasonryGrid is a grid that stacks items with the same width as a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new item.
  • JustifiedGrid: 'justified' is a printing term with the meaning that 'it fits in one row wide'. The JustifiedGrid is a grid that the item is filled up on the basis of a line given a size.
  • FrameGrid: 'Frame' is a printing term with the meaning that 'it fits in one row wide'. The FrameGrid is a grid that the item is filled up on the basis of a line given a size.
  • PackingGrid: The PackingGrid is a grid that shows the important items bigger without sacrificing the weight of the items. Rows and columns are separated so that items are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.

Documents

Download and Installation

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

$ npm install @egjs/vue-grid

How to use

<template>
  <masonry-grid
    class="container"
    v-bind:gap="gap"
    v-bind:align="align"
  >
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
    <div class="item">8</div>
    <div class="item">9</div>
    <div class="item">10</div>
  </masonry-grid>
</template>
<script>
import { MasonryGrid, JustifiedGrid, FrameGrid, PackingGrid } from "@egjs/vue-grid";

export default {
  datas: {
    gap: 5,
    align: "justify",
  },
  components: {
    MasonryGrid,
  }
}
</script>

2. Install dependencies

# Install the dependency modules.
$ npm install

3. npm start

Run storybook for development.

Open http://localhost:6009 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

3. npm build

Use npm script to build Grid

# Build
$ npm run build

Bug Report

If you find a bug, please report to us opening a new Issues on GitHub.

License

egjs-grid is released under the MIT license.

Copyright (c) 2021-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.

版本与发布记录

@egjs/vue-grid 共发布 36 个版本,首次发布于 2021/03/26;过去 12 个月发布了 2 个版本。

版本发布日期距今
1.18.1latest2026/10/3014 天前
1.18.02025/12/1211 个月前
1.17.02025/07/031.4 年前
1.16.02024/07/022 年前
1.15.02023/11/242 年前
1.14.22023/08/033 年前

其他发布通道:beta → 1.2.0-beta.0。

关于 @egjs/vue-grid 的常见问题

@egjs/vue-grid 是什么?

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

如何安装 @egjs/vue-grid?

在项目目录运行 npm install @egjs/vue-grid,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(>=2.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@egjs/vue-grid 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@egjs/vue-grid 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@egjs/vue-grid 可以商用吗?

@egjs/vue-grid 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@egjs/vue-grid 的下载量有多少?

根据 npm 官方下载统计,@egjs/vue-grid 在 2026/10/13 – 2026/11/11 这 30 天内被下载 5,430 次,日均约 181 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@egjs/vue-grid 还在维护吗?

最新版本 1.18.1 发布于 2026/10/30(14 天前);至今共发布 36 个版本,其中过去 12 个月发布了 2 个;首次发布于 2021/03/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。