https://github.com/st0ffern/react-native-grid-view
React Native`s ListView but with grid setup.
https://github.com/st0ffern/react-native-grid-view
Last synced: 9 months ago
JSON representation
React Native`s ListView but with grid setup.
- Host: GitHub
- URL: https://github.com/st0ffern/react-native-grid-view
- Owner: st0ffern
- Created: 2016-07-16T06:53:51.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-16T14:03:43.000Z (almost 10 years ago)
- Last Synced: 2025-09-09T11:34:57.972Z (10 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-grid-view
React Native`s ListView but with grid setup.
## Props
- `renderItem`: **required ** content to render items
- `dataSource`: **required ** an array of items that should be listed, standard dataSource format.
- `imagesPerRow`: optional input to set the amout of items pr row (Default: 3)
- `imageMargin`: optional input to set margins in the view (Default: 5)
- `backgroundColor`: optional input to set background color (Default: black)
## Usage Examples
```js
var GridView = require("react-native-gridview");
// or
import GridView from "react-native-gridview"
```
```javascript
render(){
return(
this.renderItem(data)}
dataSource=[1,2,3,4,5]
imagesPerRow={4}
imageMargin={5}
backgroundColor="white"
/>
)
}
renderItem(data){
return(
{data}
)
}
```