{"id":18596420,"url":"https://github.com/waynekim92/react-native-pager-view-x","last_synced_at":"2026-01-05T15:34:16.119Z","repository":{"id":255439196,"uuid":"850920827","full_name":"WayneKim92/react-native-pager-view-x","owner":"WayneKim92","description":"replacement component of x-axis react-native-pager-view","archived":false,"fork":false,"pushed_at":"2024-09-23T07:16:31.000Z","size":1437,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T01:16:37.508Z","etag":null,"topics":["component","react-native","ui"],"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/WayneKim92.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":"2024-09-02T04:58:37.000Z","updated_at":"2024-09-23T10:55:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0804373-8ec6-4092-abcb-2912ed35bf82","html_url":"https://github.com/WayneKim92/react-native-pager-view-x","commit_stats":null,"previous_names":["waynekim92/react-native-pager-view-x"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneKim92%2Freact-native-pager-view-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneKim92%2Freact-native-pager-view-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneKim92%2Freact-native-pager-view-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WayneKim92%2Freact-native-pager-view-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WayneKim92","download_url":"https://codeload.github.com/WayneKim92/react-native-pager-view-x/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252696,"owners_count":21072701,"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":["component","react-native","ui"],"created_at":"2024-11-07T01:24:18.277Z","updated_at":"2026-01-05T15:34:16.113Z","avatar_url":"https://github.com/WayneKim92.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Pager View X\n\n\n## Installation\n\n```sh\nnpm install react-native-pager-view-x\n# or\nyarn add react-native-pager-view-x\n```\n\n## Usage\nIf you encounter a bug due to react-native-pager-view, you can also use the FlatList provided by default in RN.\n\n```tsx\nconst pagerViewXRef = useRef\u003cPagerViewXRef\u003e(null);\nconst scrollEnabledRef = useRef(true);\n\nreturn (\n  \u003cPagerViewX ref={pagerViewXRef} initialPage={1}\u003e\n    \u003cView\n      style={{\n        flex: 1,\n        width: Dimensions.get('window').width,\n        backgroundColor: 'red',\n      }}\n    \u003e\n      \u003cButton\n        title={'toggle setScrollEnabled'}\n        onPress={() =\u003e {\n          pagerViewXRef.current?.setScrollEnabled(\n            !scrollEnabledRef.current\n          );\n          scrollEnabledRef.current = !scrollEnabledRef.current;\n        }}\n      /\u003e\n      \u003cExButton\n        text={'Go to 3 Page'}\n        onPress={() =\u003e {\n          pagerViewXRef.current?.setPage(2);\n        }}\n      /\u003e\n    \u003c/View\u003e\n    \u003cView style={{ flex: 1, backgroundColor: 'blue' }} /\u003e\n    \u003cView style={{ flex: 1, backgroundColor: 'green' }}\u003e\n      \u003cExButton\n        text={'go to 1page without animation'}\n        onPress={() =\u003e {\n          pagerViewXRef.current?.setPageWithoutAnimation(0);\n        }}\n      /\u003e\n    \u003c/View\u003e\n  \u003c/PagerViewX\u003e\n```\n\n## Video\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cvideo src=\"https://github.com/user-attachments/assets/27a7e2f1-3c05-4345-a2fd-bc1aaa873467\" width=\"300\" height=\"600\" /\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## API\n\n### `Props`\n\n| Prop               | Type                                             | Description                                      |\n|--------------------|--------------------------------------------------|--------------------------------------------------|\n| `initialPage`      | number (optional)                                | The initial page index.                          |\n| `scrollEnabled`    | boolean (optional)                               | Sets whether scrolling is enabled.               |\n| `onPageScroll`     | function (optional)                              | Event handler for page scroll events.            |\n| `children`         | ReactElement or ReactElement\\[\\] (optional)      | Child elements to be displayed as pages.         |\n| `activityIndicator`| ReactNode (optional)                             | Component to display while a page is loading.    |\n| `[key: string]`    | any                                              | Any prop that can be used in FlatList can be added                      |\n\n\n### `Methods` from ref\n\n| Method                    | Description                                      |\n|---------------------------|--------------------------------------------------|\n| `setPage`                 | Sets the current page.                           |\n| `setPageWithoutAnimation` | Sets the current page without animation.         |\n| `setScrollEnabled`        | Sets whether scrolling is enabled.               |\n\n\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\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynekim92%2Freact-native-pager-view-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaynekim92%2Freact-native-pager-view-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynekim92%2Freact-native-pager-view-x/lists"}