Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luckcoding/react-native-flex-grid-view

react native grid view layout.
https://github.com/luckcoding/react-native-flex-grid-view

gird react-native react-native-component

Last synced: about 11 hours ago
JSON representation

react native grid view layout.

Awesome Lists containing this project

README

        

# react-native-flex-grid-view

[![npm version](https://img.shields.io/npm/v/react-native-flex-grid-view.svg)](https://www.npmjs.com/package/react-native-flex-grid-view)

简单的 react native 布局。

Easy Grid View for React Native.

![screenshot](screenshot1.png)
![screenshot](screenshot2.png)
![screenshot](screenshot3.png)

## Installation

```
npm install react-native-flex-grid-view
```

## example

```
import GridView from 'react-native-flex-grid-view'

}
/>
```

## API

| Property | Type | Default Value | Description |
|:----:|:----:|:----:|:----:|
|data|Array|[]|将要被渲染的数据(Items to be rendered)|
|span|Number|1|每行的个数(each row num)
|render|Function|() => {}|传入data内每个对象,返回组件(render each object in data, return a component)|
|spacing|Number|0|间距(Spacing between each item)|
|border|Number|0|边宽(border width)|
|borderColor|String|'black'|边框的颜色(border color)|
|square|Boolean|false|是否保持正方形(true: is a square)|
|flat|Boolean|true|是否采用 **FlatList** 或着 纯粹布局(true: use **FlatList**, false: only View Grid)