# nopast-react-waterfall

> A React Component for waterfall layout

Latest version **1.1.0** (published 2020-10-05) · 0 weekly downloads

## Install

```sh
npm install nopast-react-waterfall
pnpm add nopast-react-waterfall
yarn add nopast-react-waterfall
bun add nopast-react-waterfall
```

## 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.1.0 |
| Published | 2020-10-05 |
| First published | 2019-01-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 74.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | nopast |
| Maintainers | bugkun |
| Keywords | react, component, react-component, waterfall |

## Links

- npm: https://www.npmjs.com/package/nopast-react-waterfall
- Repository: https://github.com/BugKun/nopast-react-waterfall
- Issues: https://github.com/BugKun/nopast-react-waterfall/issues
- npm.io page: https://npm.io/package/nopast-react-waterfall

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2020-10-05
- 1.0.0 — 2019-01-07

## README

# nopast-react-waterfall
A React Component for waterfall layout.

## Installation
```bash
npm install nopast-react-waterfall --save-dev
```

## Browser Support
### Defalut version
[![Build Status](https://saucelabs.com/browser-matrix/que-etc.svg)](https://saucelabs.com/beta/builds/303f5344a7214ba5b62bc7079a15d376)

**NOTE:** Internet Explorer 8 and its earlier versions are not supported.

### Slim version
![Without any Polyfill](https://raw.githubusercontent.com/BugKun/react-element-onresize/master/Browser-Support-Without-Polyfill.png)


## Usage
### Defalut version and Slim version
```javascript
import React, { Component } from 'react';
import ReactWaterFall from 'nopast-react-waterfall'; //Defalut version
import ReactWaterFall from 'nopast-react-waterfall/dist/nopast-react-waterfall.slim'; //Slim version


class App extends Component {
  constructor(props){
    super(props);
  }

  render(){
    const { elemResize } = this.props;

    return (
        <ReactWaterFall options={...}>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
        </ReactWaterFall>
    )
  }
}

export default App;
```
### Personal polyfill usage
```javascript
import React, { Component } from 'react';
import ReactWaterFall from 'nopast-react-waterfall/dist/nopast-react-waterfall.polyfill'; //Polyfill requirement version
import resizeObserver from "resize-observer-polyfill";
const ReactWaterFall = ReactWaterFallFunc(resizeObserver);

class App extends Component {
  constructor(props){
    super(props);
  }

  render(){
    const { elemResize } = this.props;

    return (
        <ReactWaterFall options={...}>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
            <div style={{height: 500, width: 400}}><img /></div>
        </ReactWaterFall>
    )
  }
}

export default App;
```

## Options
> spaceBetween (Type:Number)：Each child component space between<br>
> dynamic (Type:Boolean)：Dynamically resize the component to fill the container<br>
> permutation (Type:String)：The method of permutation. <br>
>> min-height：Minimum height difference between each column<br>
>> min-insert：Insert minimum height column<br>
>>>
> animation (Type:Object)：Animation setup<br>
>> duration (Type:Number)：Animation duration<br>
>> type (Type:String)：：Animation timing function<br>

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