@nju33/react-masonry
v1.0.1
Published
A masonry layout library where used React and Flexbox
Downloads
59
Readme
react-masonry
Install
yarn add @nju33/react-masonry react react-dom styled-components
This library includes the d.ts
.
Demo
https://nju33.github.io/react-masonry/
Sample Code
import React from 'react';
import {render} from 'react-dom';
import {Masonry} from '@nju33/react-masonry';
render(
(
<Masonry
col={3}
gap={16}
>
<div style={{width: '100%', height: '100px'}}>
<Something />
</div>
<div style={{width: '100%', height: '100px'}}>
<Something />
</div>
{/* ... */}
</Masonry>
),
document.body
)