@abdulghani/masonrygrid 中文文档教程
Breakpointcontext
React.js 基于 flexbox 的砌体网格,具有确定的列和顺序呈现的项目。
Install
从 yarn/npm 获取它,无论
yarn add @abdulghani/masonrygrid
npm install @abdulghani/masonrygrid
Usage
使用它多么简单
import MasonryGrid from "@abdulghani/masonrygrid";
const MyComponent = () => {
return (
<MasonryGrid col={3} className="mx-3">
{products.map((item: any) => (
<Product key={item.id} value={item} />
))}
</MasonryGrid>
);
};
// the className will applied to each column element
Breakpointcontext
React.js flexbox-based masonry grid with determned column and sequentially rendered item.
Install
get it from yarn/npm whatever
yarn add @abdulghani/masonrygrid
npm install @abdulghani/masonrygrid
Usage
use it as simple as
import MasonryGrid from "@abdulghani/masonrygrid";
const MyComponent = () => {
return (
<MasonryGrid col={3} className="mx-3">
{products.map((item: any) => (
<Product key={item.id} value={item} />
))}
</MasonryGrid>
);
};
// the className will applied to each column element