{"id":18908934,"url":"https://github.com/luckcoding/react-native-flex-grid-view","last_synced_at":"2025-04-15T05:32:18.915Z","repository":{"id":57337063,"uuid":"104834065","full_name":"luckcoding/react-native-flex-grid-view","owner":"luckcoding","description":"react native grid view layout.","archived":false,"fork":false,"pushed_at":"2017-11-28T09:40:18.000Z","size":122,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-26T22:07:17.124Z","etag":null,"topics":["gird","react-native","react-native-component"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luckcoding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-26T03:59:22.000Z","updated_at":"2021-04-03T08:38:05.000Z","dependencies_parsed_at":"2022-09-12T11:02:15.320Z","dependency_job_id":null,"html_url":"https://github.com/luckcoding/react-native-flex-grid-view","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckcoding%2Freact-native-flex-grid-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckcoding%2Freact-native-flex-grid-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckcoding%2Freact-native-flex-grid-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckcoding%2Freact-native-flex-grid-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luckcoding","download_url":"https://codeload.github.com/luckcoding/react-native-flex-grid-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223660927,"owners_count":17181578,"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":["gird","react-native","react-native-component"],"created_at":"2024-11-08T09:29:45.176Z","updated_at":"2024-11-08T09:29:45.780Z","avatar_url":"https://github.com/luckcoding.png","language":"JavaScript","readme":"# react-native-flex-grid-view\n\n[![npm version](https://img.shields.io/npm/v/react-native-flex-grid-view.svg)](https://www.npmjs.com/package/react-native-flex-grid-view)\n\n简单的 react native 布局。\n\nEasy Grid View for React Native.\n\n![screenshot](screenshot1.png)\n![screenshot](screenshot2.png)\n![screenshot](screenshot3.png)\n\n## Installation\n\n```\nnpm install react-native-flex-grid-view\n```\n\n## example\n\n```\nimport GridView from 'react-native-flex-grid-view'\n\n\u003cGridView\n  data={[\n    '#1abc9c', '#3498db', '#34495e', '#16a085', '#27ae60', '#2980b9',\n    '#8e44ad', '#2c3e50', '#e67e22', '#e74c3c', '#ecf0f1', '#95a5a6',\n    '#f39c12', '#d35400', '#c0392b', '#bdc3c7', '#7f8c8d', '#27ae60',\n    '#1abc9c', '#3498db', '#34495e', '#16a085', '#27ae60', '#2980b9',\n    '#8e44ad', '#2c3e50', '#e67e22', '#e74c3c', '#ecf0f1', '#95a5a6',\n    '#f39c12', '#d35400', '#c0392b', '#bdc3c7', '#7f8c8d', '#27ae60',\n  ]}\n  span={4}\n  border={1}\n  borderColor=\"white\"\n  spacing={0}\n  square\n  flat\n  render={item =\u003e \u003cView style={{ backgroundColor: item, flex: 1 }} /\u003e}\n/\u003e\n```\n\n## API\n\n| Property | Type | Default Value | Description |\n|:----:|:----:|:----:|:----:|\n|data|Array|[]|将要被渲染的数据(Items to be rendered)|\n|span|Number|1|每行的个数(each row num)\n|render|Function|() =\u003e {}|传入data内每个对象，返回组件(render each object in data, return a component)|\n|spacing|Number|0|间距(Spacing between each item)|\n|border|Number|0|边宽(border width)|\n|borderColor|String|'black'|边框的颜色(border color)|\n|square|Boolean|false|是否保持正方形(true: is a square)|\n|flat|Boolean|true|是否采用 **FlatList** 或着 纯粹布局(true: use **FlatList**, false: only View Grid)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckcoding%2Freact-native-flex-grid-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluckcoding%2Freact-native-flex-grid-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckcoding%2Freact-native-flex-grid-view/lists"}