@urcloud/equal-height-waterfall
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

equal-height-waterfall

  • break line when sum of aspect ratio > 2
  • item's min width > 1/4 container's width
  • item's max width < 2/3 container's width
  • item's max height < 300

Install

npm install @urcloud/equal-height-waterfall -S

Usage

import { EqualHeightWaterfall } from '@urcloud/equal-height-waterfall'
const ins = new EqualHeightWaterfall({
  containerWidth: window.screen.width,
  breakLineAspectRatioSum: 2,
  itemFallbackAspectRatio: 1,
  itemMinWidthPercent: 1 / 4,
  itemMaxWidthPercent: 2 / 3,
  itemMaxHeight: 400,
  gutter: 4
})
const { items, renderTotalHeight } = ins.add()

Readme

Keywords

none

Package Sidebar

Install

npm i @urcloud/equal-height-waterfall

Weekly Downloads

10

Version

1.2.4

License

none

Unpacked Size

1.01 MB

Total Files

18

Last publish

Collaborators

  • zenonux