npm i react-waterfall-responsive
<Waterfall
columnNum={4}
gap={5}
>
{
items.map((item, index) => (
<ChildComponent
key={index}
width={width}
height={height}
/>
))
}
</Waterfall>
- columnNum:瀑布流的列数
- gap:间距