{"id":21174815,"url":"https://github.com/mindinventory/react-native-stagger-view","last_synced_at":"2025-07-09T21:31:08.620Z","repository":{"id":42689751,"uuid":"444359929","full_name":"Mindinventory/react-native-stagger-view","owner":"Mindinventory","description":"Staggered Grid View is a type of layout that is used to display images and posts. As you see in various social platforms such as Pinterest and many more. (staggered, masonry, quilted, woven, etc.).","archived":false,"fork":false,"pushed_at":"2023-04-18T08:45:11.000Z","size":98610,"stargazers_count":89,"open_issues_count":1,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-07T12:09:10.553Z","etag":null,"topics":["react-native","react-native-stagger-view","reactnative-list-view","stagger-view"],"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/Mindinventory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-04T09:30:28.000Z","updated_at":"2025-04-25T06:18:51.000Z","dependencies_parsed_at":"2024-06-19T00:01:33.318Z","dependency_job_id":"7b670792-df3a-4513-9ca6-8213314885c4","html_url":"https://github.com/Mindinventory/react-native-stagger-view","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"fb554f59c5420f401f18ca903c533e885b9936a2"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Mindinventory/react-native-stagger-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2Freact-native-stagger-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2Freact-native-stagger-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2Freact-native-stagger-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2Freact-native-stagger-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mindinventory","download_url":"https://codeload.github.com/Mindinventory/react-native-stagger-view/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mindinventory%2Freact-native-stagger-view/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264503949,"owners_count":23618762,"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":["react-native","react-native-stagger-view","reactnative-list-view","stagger-view"],"created_at":"2024-11-20T16:56:21.100Z","updated_at":"2025-07-09T21:31:08.296Z","avatar_url":"https://github.com/Mindinventory.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [react-native-stagger-view](https://www.npmjs.com/package/@mindinventory/react-native-stagger-view)\n\nA **@mindinventory/react-native-stagger-view** package is used to show listing with the Staggered, It works like a normal Flatlist with included refreshing, loading, header, footer, renderItem, loaderView, custom style of header footer and container but it's managed dynamic height of the Item just you need give Item height in its style.\n\n\u003ca href=\"https://www.mindinventory.com/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=react-native-stagger-view\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/48902198/148067650-1949d1f0-b446-4ebc-b378-384e66fd7b8e.png\"\u003e\u003c/a\u003e\n\n### Animations\n\n![Fade In](https://user-images.githubusercontent.com/88423352/160378928-a2e472c6-df2f-4e11-9566-cd1e32e67a3e.gif)\n![Slide-Left](https://user-images.githubusercontent.com/88423352/160379456-33f6202c-4184-4ecd-852b-a85c099faf71.gif)\n![Slide-Down](https://user-images.githubusercontent.com/88423352/160379469-37adc7e9-9ebf-4a46-a895-0ecaf7c226ec.gif)\n![Effective](https://user-images.githubusercontent.com/88423352/160378368-563dc457-54e6-421d-94c6-534e3bd9e9cc.gif)\n![Flipped](https://user-images.githubusercontent.com/88423352/160379485-809a22e8-82f8-4016-aa57-0d1553f54e15.gif)\n\n\n### Installation\n\nusing npm:\n\n```\nnpm install @mindinventory/react-native-stagger-view\n```\n\nusing yarn:\n\n```\nyarn add @mindinventory/react-native-stagger-view\n```\n\n### Supported platform\n\n- Android\n- Ios\n\n### Usage\n\n```js\nimport StaggeredList from '@mindinventory/react-native-stagger-view';\n...\n\n\u003cStaggeredList\n            data={imageURL}\n            animationType={'FADE_IN_FAST'}\n            contentContainerStyle={styles.contentContainer}\n            showsVerticalScrollIndicator={false}\n            renderItem={({item}) =\u003e renderChildren(item)}\n            isLoading={isLoading}\n            LoadingView={\n              \u003cView style={styles.activityIndicatorWrapper}\u003e\n                \u003cActivityIndicator color={'black'} size={'large'} /\u003e\n              \u003c/View\u003e\n            }\n          /\u003e\n\n const renderChildren = item =\u003e {\n    return (\n      \u003cView style={getChildrenStyle()} key={item.id}\u003e\n        \u003cView style={styles.avatarImage}\u003e\n          \u003cImage\n            onError={() =\u003e {}}\n            style={styles.img}\n            source={{\n              uri: item.url,\n            }}\n            resizeMode={'cover'}\n          /\u003e\n        \u003c/View\u003e\n      \u003c/View\u003e\n    );\n  };\n\nconst getChildrenStyle = () =\u003e {\n    return {\n      width: (SCREEN_WIDTH - 18) / 2,\n      height: Number(Math.random() * 20 + 12) * 10,\n      backgroundColor: 'gray',\n      margin: 4,\n      borderRadius: 18,\n    };\n  };\n```\n\n### Documentation\n\n| Prop                     | Type                                                                                 | Description                                                                                                                                 | Default   |\n| ------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | --------- |\n| animationType            | `FADE_IN_FAST` OR `SLIDE_LEFT` OR `SLIDE_DOWN` OR `EFFECTIVE` OR `FLIPPED` OR `NONE` | Appying Animation to list or default NONE item.                                                                                             |           |\n| innerRef                 | `MutableRefObject\u003cScrollView\u003e`                                                       | ScrollView ref to be forwarded to the underlying scrollView.                                                                                | undefined |\n| innerRef                 | `MutableRefObject\u003cScrollView\u003e`                                                       | ScrollView ref to be forwarded to the underlying scrollView.                                                                                | undefined |\n| keyPrefix                | string                                                                               | Unique key for each item.                                                                                                                   |           |\n| loading                  | boolean                                                                              | if true, the loadingView will be shown on top of the list.                                                                                  | false     |\n| refreshing               | `RefreshControlProps['refreshing']`                                                  | Add pull to refresh in the list.                                                                                                            |           |\n| onRefresh                | `RefreshControlProps['onRefresh']`                                                   | Callback function when user pull to refresh.                                                                                                |           |\n| onEndReached             | `() =\u003e void`                                                                         | callback in scrollView onEndReached.                                                                                                        |           |\n| onEndReachedThreshold    | number                                                                               | Threshold in pixels (virtual, not physical) for calling onEndReached. It calls onEndReached if you scrolled to this pixels from the bottom. |           |\n| style                    | `StyleProp\u003cViewStyle\u003e`                                                               | style object for the listing.                                                                                                               |           |\n| data                     | T[]                                                                                  | Items to be rendered.                                                                                                                       |           |\n| renderItem               | `({item: T, i: number}) =\u003e ReactElement`                                             | Takes an item from data and renders it into the list.                                                                                       |           |\n| LoadingView              | `ComponentType\u003cany\u003e`                                                                 | Rendered while loading.                                                                                                                     |           |\n| ListHeaderComponent      | `ComponentType\u003cany\u003e`                                                                 | Rendered at the top of all the items.                                                                                                       | null      |\n| ListEmptyComponent       | `ComponentType\u003cany\u003e`                                                                 | Rendered when the list is empty.                                                                                                            | null      |\n| ListFooterComponent      | `ComponentType\u003cany\u003e`                                                                 | Rendered at the bottom of all the items.                                                                                                    | null      |\n| ListHeaderComponentStyle | `StyleProp\u003cViewStyle\u003e`                                                               | Style of the header.                                                                                                                        |           |\n| contentContainerStyle    | `StyleProp\u003cViewStyle\u003e`                                                               | Style of the content container style of the main scrollView.                                                                                |           |\n| containerStyle           | `StyleProp\u003cViewStyle\u003e`                                                               | Style of main scrollView.                                                                                                                   |           |\n| numColumns               | number                                                                               | Multiple columns can only be rendered.                                                                                                      | 2         |\n\n### Changelog\n\n**Version: 1.2.0**\n\n- Fixed Objects are not valid as a React child issue.\n\n### LICENSE!\n\n@mindinventory/react-native-stagger-view is [MIT-licensed](https://github.com/Mindinventory/react-native-stagger-view/blob/main/LICENSE).\n\n### Let us know!\n\nWe’d be really happy if you send us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.\n\n## 📌 Credits :\n\nThis project is made possible by the community surrounding it and especially the wonderful people. Rendering a list is basically clone form this repo [GitHub Repo](https://github.com/hyochan/react-native-masonry-list/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindinventory%2Freact-native-stagger-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindinventory%2Freact-native-stagger-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindinventory%2Freact-native-stagger-view/lists"}