# tavern-waterfall-layout

> Waterfall flow layout javascript

Latest version **1.0.0** (published 2022-12-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install tavern-waterfall-layout
pnpm add tavern-waterfall-layout
yarn add tavern-waterfall-layout
bun add tavern-waterfall-layout
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-12-29 |
| First published | 2022-12-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tavern-julius |
| Maintainers | julius.wang |
| Keywords | waterfall, waterfall-layout, tavern, tavern-waterfall-layout, layout |

## Links

- npm: https://www.npmjs.com/package/tavern-waterfall-layout
- npm.io page: https://npm.io/package/tavern-waterfall-layout

## Recent versions

- 1.0.0 (latest) — 2022-12-29

## README

### 使用方法



1. 安装`npm install tavern-waterfall-layout --save`

   

2. 使用 在`vue`中

```html
<template>
  <div class="list">
    <div class="waterfall" id="waterfall">
      <div class="wapper-item" v-for="item in 6" :key="item" >{{ item }}</div>
    </div>
  </div>
</template>
<script setup lang="ts">
import wLayout from 'tavern-waterfall-layout'
import { onMounted } from 'vue'

onMounted(() => {
  const waterfall = document.getElementById('waterfall')
  let wlayout = new wLayout(waterfall, { gap: 20 })
  wlayout.init()
})

</script>

<style lang="scss" scoped>
  .wapper {
    position: relative;
    width: 100vh;
    &-item {
      width: 300px;
      height: 100px;
      margin-bottom: 20px;
    }
  }
</style>

```




###  Attributes

| 参数          | 说明            | 类型            | 可选值                 | 默认   |
|-------------  |---------------- |---------------- |:--------------------: |-------- |
| DOM | 参数1 | Document |  |  |
| options | 参数2，gap: 间距 | Object | Gap | 0 |

---
_Source: https://npm.io/package/tavern-waterfall-layout · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
