{"id":4392,"url":"https://github.com/gusgard/react-native-grid-list","last_synced_at":"2025-07-29T21:31:52.131Z","repository":{"id":46185717,"uuid":"111242503","full_name":"gusgard/react-native-grid-list","owner":"gusgard","description":"🌁 Grid list component implemented with FlatList","archived":false,"fork":false,"pushed_at":"2021-11-08T18:10:40.000Z","size":8446,"stargazers_count":104,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-30T00:46:18.215Z","etag":null,"topics":["flatlist","flatlist-grid","grid","grid-component","grid-layout","grid-list","grid-view","react","react-native"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gusgard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-18T21:55:57.000Z","updated_at":"2024-09-20T15:00:33.000Z","dependencies_parsed_at":"2022-09-08T10:13:34.597Z","dependency_job_id":null,"html_url":"https://github.com/gusgard/react-native-grid-list","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusgard%2Freact-native-grid-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusgard%2Freact-native-grid-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusgard%2Freact-native-grid-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusgard%2Freact-native-grid-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gusgard","download_url":"https://codeload.github.com/gusgard/react-native-grid-list/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228046862,"owners_count":17861109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flatlist","flatlist-grid","grid","grid-component","grid-layout","grid-list","grid-view","react","react-native"],"created_at":"2024-01-05T20:17:10.485Z","updated_at":"2024-12-04T05:12:38.761Z","avatar_url":"https://github.com/gusgard.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["Navigation"],"readme":"# :foggy: Grid list component\n\n![platforms](https://img.shields.io/badge/platforms-Android%20|%20iOS-brightgreen.svg)\n[![npm](https://img.shields.io/npm/v/react-native-grid-list.svg)](https://www.npmjs.com/package/react-native-grid-list)\n[![npm](https://img.shields.io/npm/dm/react-native-grid-list.svg)](https://www.npmjs.com/package/react-native-grid-list)\n[![travis](https://travis-ci.org/gusgard/react-native-grid-list.svg?branch=master)](https://travis-ci.org/gusgard/react-native-grid-list)\n![license](https://img.shields.io/npm/l/react-native-grid-list.svg)\n\n![Demo](https://raw.githubusercontent.com/gusgard/react-native-grid-list/master/demo.gif)\n\n## Installation\n\n```\nyarn add react-native-grid-list\n```\n\nor\n\n```\nnpm install react-native-grid-list --save\n```\n\n## Example\n\n### Expo\n\n[Example](https://snack.expo.io/@gusgard/react-native-grid-list)\n\n### Code\n\n```js\nimport React, { PureComponent } from 'react';\nimport { View, StyleSheet, Image } from 'react-native';\n\nimport GridList from 'react-native-grid-list';\n\nconst items = [\n  { thumbnail: { uri: 'https://lorempixel.com/200/200/animals' } },\n  { thumbnail: { uri: 'https://lorempixel.com/200/200/city' } },\n  { thumbnail: { uri: 'https://lorempixel.com/200/200/nature' } },\n  { thumbnail: { uri: 'https://lorempixel.com/200/200/cats' } },\n];\n\nexport default class App extends PureComponent {\n  renderItem = ({ item, index }) =\u003e (\n    \u003cImage style={styles.image} source={item.thumbnail} /\u003e\n  );\n\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cGridList\n          showSeparator\n          data={items}\n          numColumns={3}\n          renderItem={this.renderItem}\n        /\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: 'white',\n  },\n  image: {\n    width: '100%',\n    height: '100%',\n    borderRadius: 10,\n  },\n});\n```\n\nCheck the code [here](./example/README.md)\n\nYou can use all the props from FlatList:\nhttp://facebook.github.io/react-native/docs/flatlist.html\n\n## Props\n\n| Prop                            |              Default               |      Type       | Description                                |\n| :------------------------------ | :--------------------------------: | :-------------: | :----------------------------------------- |\n| children                        |                 -                  |     `node`      | Children elements                          |\n| data                            | _not required if children is used_ |     `array`     | Data to use in renderItem                  |\n| renderItem                      | _not required if children is used_ |     `func`      | Function that render each item of the grid |\n| numColumns                      |                 3                  |    `number`     | Number of elements in a row                |\n| itemStyle                       |                 {}                 | `ViewPropTypes` | Style for the wrapper of item              |\n| **Separator**                   |\n| showSeparator                   |               false                |     `bool`      | Show a separator between items             |\n| separatorBorderWidth            |                 0                  |    `number`     | Set separator width                        |\n| separatorBorderColor            |              'white'               |    `string`     | Set separator color                        |\n| **Animation**                   |\n| showAnimation                   |               false                |     `bool`      | Show an animation when load item           |\n| animationInitialBackgroundColor |              'white'               |    `string`     | Set initial backgroundColor for animation  |\n| animationDuration               |                500                 |    `number`     | Duration of the animation                  |\n\n## Author\n\nGustavo Gard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgusgard%2Freact-native-grid-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgusgard%2Freact-native-grid-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgusgard%2Freact-native-grid-list/lists"}