{"id":28092620,"url":"https://github.com/hamidhadi/react-native-collapsible-list","last_synced_at":"2025-05-13T13:23:50.285Z","repository":{"id":30049107,"uuid":"123773125","full_name":"hamidhadi/react-native-collapsible-list","owner":"hamidhadi","description":"A ReactNative collapsible list component","archived":false,"fork":false,"pushed_at":"2023-01-04T12:06:48.000Z","size":1848,"stargazers_count":66,"open_issues_count":21,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T13:14:23.190Z","etag":null,"topics":["android","collapsible","dynamic","ios","list","react-native","typescript"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/hamidhadi.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":"2018-03-04T09:11:31.000Z","updated_at":"2025-02-11T15:50:16.000Z","dependencies_parsed_at":"2023-01-14T16:15:23.750Z","dependency_job_id":null,"html_url":"https://github.com/hamidhadi/react-native-collapsible-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/hamidhadi%2Freact-native-collapsible-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidhadi%2Freact-native-collapsible-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidhadi%2Freact-native-collapsible-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidhadi%2Freact-native-collapsible-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamidhadi","download_url":"https://codeload.github.com/hamidhadi/react-native-collapsible-list/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948785,"owners_count":21989022,"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","collapsible","dynamic","ios","list","react-native","typescript"],"created_at":"2025-05-13T13:23:49.730Z","updated_at":"2025-05-13T13:23:50.276Z","avatar_url":"https://github.com/hamidhadi.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-collapsible-list\n\nA ReactNative collapsible list component\n\n![react-native-collapsible-list example](/demo.gif)\n\n## Installation\n\nYou can install this package via `yarn`:\n\n```\nyarn add react-native-collapsible-list\n```\n\nor `npm`\n\n```bash\nnpm install react-native-collapsible-list --save\n```\n\n## Basic Usage\n\n```js\nimport React, { Component } from \"react\";\nimport { Text, View } from \"react-native\";\nimport CollapsibleList from \"react-native-collapsible-list\";\n\nexport default class App extends Component {\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cCollapsibleList\n          numberOfVisibleItems={1}\n          wrapperStyle={styles.wrapperCollapsibleList}\n          buttonContent={\n            \u003cView style={styles.button}\u003e\n              \u003cText style={styles.buttonText}\u003e{buttonText}\u003c/Text\u003e\n            \u003c/View\u003e\n          }\n        \u003e\n          \u003cView style={styles.collapsibleItem}\u003e\n            \u003cText\u003eHello Collapsable List :)\u003c/Text\u003e\n          \u003c/View\u003e\n          \u003cView style={styles.collapsibleItem}\u003e\n            \u003cText\u003eCollapsable List Item\u003c/Text\u003e\n          \u003c/View\u003e\n          \u003cView style={styles.collapsibleItem}\u003e\n            \u003cText\u003eAnother Collapsable List Item\u003c/Text\u003e\n          \u003c/View\u003e\n        \u003c/CollapsibleList\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    backgroundColor: \"rgba(0, 0, 0, 0.1)\"\n  },\n  wrapperCollapsibleList: {\n    flex: 1,\n    marginTop: 20,\n    overflow: \"hidden\",\n    backgroundColor: \"#FFF\",\n    borderRadius: 5\n  },\n  collapsibleItem: {\n    borderBottomWidth: StyleSheet.hairlineWidth,\n    borderColor: \"#CCC\",\n    padding: 10\n  }\n});\n```\n\n## Properties\n\n| Prop                 | Type                                                                                                         | Default                                                                                | Description                                                                                                                               |\n| :------------------- | :----------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| animationConfig      | [ReactNative.LayoutAnimationConfig](https://facebook.github.io/react-native/docs/layoutanimation#parameters) | `{duration: 700, update: { type: \"spring\", springDamping: 0.7, property: \"scaleXY\" }}` | Overrides each property of the default value if specified                                                                                 |\n| buttonContent        | `React.ReactNode`                                                                                            | `null`                                                                                 | Content of collapse button                                                                                                                |\n| buttonPosition       | `string` (`top` or `bottom`)                                                                                 | `bottom`                                                                               | Position of collapse button                                                                                                               |\n| numberOfVisibleItems | `number`                                                                                                     | `1`                                                                                    | Number of visible items when lis is not collapsed                                                                                         |\n| onToggle             | `function`                                                                                                   | `null`                                                                                 | Callback function for toggling the list with collapsed parameter which can be `true`(list is collapsed) or `false`(list is not collapsed) |\n| wrapperStyle         | `ReactNative.ViewStyle`                                                                                      | `null`                                                                                 | The style of the list wrapper                                                                                                             |\n\n## Contribution\n\nYou can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. :wink:\n\n## License\n\nLicensed under the [MIT](https://github.com/hamidhadi/react-native-collapsible-list/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidhadi%2Freact-native-collapsible-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamidhadi%2Freact-native-collapsible-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidhadi%2Freact-native-collapsible-list/lists"}