Skip to content

jyoketsu/react-waterfall-responsive

Repository files navigation

Waterfall-react 瀑布流组件

Install with npm

npm i react-waterfall-responsive

demo

demo

Usage

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