{"id":17675363,"url":"https://github.com/numandev1/react-native-masonry-grid","last_synced_at":"2025-05-12T21:13:32.778Z","repository":{"id":58413916,"uuid":"530957155","full_name":"numandev1/react-native-masonry-grid","owner":"numandev1","description":"Customizable masonry Flatlist. it just behave like Flatlist but using ScrollView behind the scene","archived":false,"fork":false,"pushed_at":"2022-08-31T06:30:45.000Z","size":3733,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T21:13:24.879Z","etag":null,"topics":["android","flatlist","gallery","grid","grid-layout","ios","list","masonry","masonry-flatlist","masonry-grid","masonry-list","masonry-scroll","pinterest","react-native","scrollview"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numandev1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-31T06:13:48.000Z","updated_at":"2025-04-08T01:20:29.000Z","dependencies_parsed_at":"2022-09-16T00:40:14.451Z","dependency_job_id":null,"html_url":"https://github.com/numandev1/react-native-masonry-grid","commit_stats":null,"previous_names":["nomi9995/react-native-masonry-grid"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Freact-native-masonry-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Freact-native-masonry-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Freact-native-masonry-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Freact-native-masonry-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numandev1","download_url":"https://codeload.github.com/numandev1/react-native-masonry-grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253823462,"owners_count":21969848,"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":["android","flatlist","gallery","grid","grid-layout","ios","list","masonry","masonry-flatlist","masonry-grid","masonry-list","masonry-scroll","pinterest","react-native","scrollview"],"created_at":"2024-10-24T07:10:54.653Z","updated_at":"2025-05-12T21:13:32.752Z","avatar_url":"https://github.com/numandev1.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/numan.dev"],"categories":[],"sub_categories":[],"readme":"### Would you like to support me?\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/nomi9995?tab=followers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/followers/nomi9995?label=Follow%20%40nomi9995\u0026style=social\" /\u003e\n\u003c/a\u003e\n\u003c/br\u003e\n\u003ca href=\"https://www.buymeacoffee.com/numan.dev\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# react-native-masonry-grid\n\nCustomizable masonry Flatlist. it just behave like [Flatlist](https://reactnative.dev/docs/flatlist) but using [ScrollView](https://reactnative.dev/docs/scrollview) behind the scene\n\n## Installation\n\n```sh\nnpm install react-native-masonry-grid\n```\n\n## Preview\n\n| ![](media/2columns.gif) | ![](media/2columns.gif) | ![](media/4columns.gif) |\n| :---------------------: | :---------------------: | :---------------------: |\n|        2-columns        |        3-columns        |        4-columns        |\n\n## Usage\n\n```js\nimport MasonryFlatlist from 'react-native-masonry-grid';\n\n// ...\nconst DATA = [\n  {\n    name: 'Coffee Now!',\n    url: 'https://mp-staging-ix.onshobbak.net/media/ninja-catalog-42/eac92236-0e4f-466a-9bc2-e68a04bb96ad_NowCoffeeNew.png',\n    height: 136, // Mendatory and can be dynamic for each item\n  }\n]\n\n\u003cMasonryFlatlist\n    data={DATA}\n    numColumns={3} // for number of columns\n    columnWrapperStyle={styles.columnWrapperStyle}\n    showsVerticalScrollIndicator={false}\n    style={styles.masonryFlatlist}\n    renderItem={({ item, index }) =\u003e {\n      return \u003cCard data={item} height={item.height} onPress={() =\u003e {}} /\u003e;\n    }}\n  /\u003e\n```\n\n## Props\n\n```\ninterface Props extends ScrollViewProps {\n  numColumns?: number;\n  loading?: boolean;\n  LoadingView?: React.ReactNode | React.ReactElement | null;\n\n  columnWrapperStyle: StyleProp\u003cViewStyle\u003e;\n  ListHeaderComponent?: React.ReactNode | React.ReactElement | null;\n  ListEmptyComponent?: typeof React.Fragment | React.ReactElement | null;\n  ListFooterComponent?: React.ReactNode | React.ReactElement | null;\n  ListHeaderComponentStyle?: StyleProp\u003cViewStyle\u003e;\n  contentContainerStyle?: StyleProp\u003cViewStyle\u003e;\n  containerStyle?: StyleProp\u003cViewStyle\u003e;\n  onRefresh?: RefreshControlProps['onRefresh'];\n  onEndReached?: () =\u003e void;\n  keyExtractor?: ((item: any, index: number) =\u003e string) | undefined;\n  onEndReachedThreshold?: number;\n  style?: StyleProp\u003cViewStyle\u003e;\n  data: any[];\n  renderItem: ({ item, index }: { item: any; index: number }) =\u003e ReactElement;\n\n}\n```\n\n| name               | required | default | description                                                                            |\n| ------------------ | -------- | ------- | -------------------------------------------------------------------------------------- |\n| numColumns         | no       | 2       | Number of columns you want to render.                                                  |\n| columnWrapperStyle | no       | null    | Optional custom style for multi-item rows generated when `numColumns \u003e 1`.             |\n| loading            | no       | false   | for enabling loadingView.                                                              |\n| LoadingView        | no       | null    | Loader component will be show when loading prop will true.                             |\n| ref                | no       | null    | it will be forwardRef to `ScrollView` then you can use all props of scrollview by ref. |\n\n**Note:** Other props are the same as [Flatlist](https://reactnative.dev/docs/flatlist). you can read flatlist docs for other props which are in props but not in the props table.\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumandev1%2Freact-native-masonry-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumandev1%2Freact-native-masonry-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumandev1%2Freact-native-masonry-grid/lists"}