# react-motion-grid

> ReactMotion Grid

Latest version **1.2.3** (published 2017-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-motion-grid
pnpm add react-motion-grid
yarn add react-motion-grid
bun add react-motion-grid
```

## 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.2.3 |
| Published | 2017-05-18 |
| First published | 2017-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Kareem Mohamed |
| Maintainers | bitriddler |
| Keywords | react-motion-grid, react-component, carousel, slider |

## Links

- npm: https://www.npmjs.com/package/react-motion-grid
- Repository: https://github.com/bitriddler/react-motion-grid
- Issues: https://github.com/bitriddler/react-motion-grid/issues
- npm.io page: https://npm.io/package/react-motion-grid

## Dependencies (8)

- [react](https://npm.io/package/react.md) ^15.5.3
- [react-motion](https://npm.io/package/react-motion.md) ^0.4.7
- [react-measure](https://npm.io/package/react-measure.md) ^1.4.6
- [react-hammerjs](https://npm.io/package/react-hammerjs.md) ^0.5.0
- [react-waypoint](https://npm.io/package/react-waypoint.md) ^5.3.0
- [styled-components](https://npm.io/package/styled-components.md) ^1.4.4
- [lodash.differenceby](https://npm.io/package/lodash.differenceby.md) ^4.8.0
- [inline-style-prefixer](https://npm.io/package/inline-style-prefixer.md) ^2.0.5

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 1.2.3 (latest) — 2017-05-18
- 1.2.2 — 2017-04-12
- 1.2.1 — 2017-04-12
- 1.2.0 — 2017-04-12
- 1.1.1 — 2017-04-11
- 1.1.0 — 2017-04-11
- 1.0.0 — 2017-04-11

## README

react-motion-grid
---------------

Installing
------------
```
$ npm install react-motion-grid --save
```

[Demos](http://bitriddler.com/playground/motion-grid)
--------------

Usage
------------
```javascript
<MotionGrid
  columns={[
    6, 6
    4, 4, 4
    3, 3, 3, 3
    6, 6,
  ]}
  innerPadding={{
    vertical: 10,
    horizontal: 10,
  }}
>
  {range(20).map(renderItem)}
</MotionGrid>
```

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| children* | arrayOf (element) |  | Array of react elements you want to render in a grid. |
| columns | union (<br />number,<br />arrayOf (number)<br />) | 12 | This controls number of columns to render for each row.<br />This **MUST** be between 1 and 12<br />e.g. `12 / 3` -> This will render 3 columns in each row.<br />e.g. `[ 6, 6, 4, 4, 4 ]` -> This will render 5 items in two rows, first <br />row will render two items (6, 6), second row will render three items<br />(4, 4, 4). |
| innerPadding | union (<br />number,<br />string,<br />shape {<br />`vertical: union`<br />`horizontal: union`<br />}<br />) | 0 | Inner paddings between items. You can have different vertical and horizontal<br />paddings. |
| startAnimate | bool | true | If you want to control when the animation should start then set this to<br />false. |
| animationType | enum ('bottomFadeIn', 'fadeIn') | 'fadeIn' | Animation type to use. |
| disableAnimation | bool |  | This will disable the animation. |
| enablePaging | bool | false | Enable paging feature. |
| pagingOptions | shape {<br />`isFetchedAll: bool`<br />`isLoading: bool`<br />`loadMoreItems: func`<br />} | {} | This is only considered when enablePaging is true. |
| springOptions | shape {<br />`stiffness: number`<br />`damping: number`<br />} | presets.noWobble | React motion configurations.<br />[More about this here](https://github.com/chenglou/react-motion#--spring-val-number-config-springhelperconfig--opaqueconfig) |
| enablePlaceholders | bool | false | Whether or not to enable placeholders. |
| placeholderRows | number | 3 | Number of placeholder rows to show before data is loaded |
| placeholderItem | element |  | React element to render for the placeholder |
| minimumPlaceholdersTime | number | 0 | Minimum millis to wait before hiding placeholder even if the data was loaded.<br />This is used to pervent flickers when the data is loaded in a very short time |

Contributing
--------------
To contribute, follow these steps:
- Fork this repo.
- Clone your fork.
- Run `npm install`
- Run `npm start`
- Goto `localhost:3000`
- Add your patch then push to your fork and submit a pull request

License
---------
MIT

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