{"id":19273974,"url":"https://github.com/rintoj/native-x-paginated-view","last_synced_at":"2025-08-21T15:46:52.109Z","repository":{"id":57308350,"uuid":"337006273","full_name":"rintoj/native-x-paginated-view","owner":"rintoj","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-08T08:43:57.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T10:37:41.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/rintoj.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":"2021-02-08T08:23:51.000Z","updated_at":"2021-02-08T08:42:39.000Z","dependencies_parsed_at":"2022-09-10T01:02:19.073Z","dependency_job_id":null,"html_url":"https://github.com/rintoj/native-x-paginated-view","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rintoj/native-x-paginated-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fnative-x-paginated-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fnative-x-paginated-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fnative-x-paginated-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fnative-x-paginated-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rintoj","download_url":"https://codeload.github.com/rintoj/native-x-paginated-view/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rintoj%2Fnative-x-paginated-view/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268328697,"owners_count":24232922,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T20:44:41.731Z","updated_at":"2025-08-02T02:37:48.824Z","avatar_url":"https://github.com/rintoj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# native-x-paginated-view\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nThis component will help you to implement a tab with a horizontal scroll to toggle between content.\n\n## Install\n\n### Yarn\n\n```sh\nyarn add native-x-paginated-view\n```\n\n### NPM\n\n```sh\nnpm install native-x-paginated-view\n```\n\n## Usage\n\n```tsx\nimport { Screen } from 'native-x-screen'\nimport React, { useEffect, useRef, useState } from 'react'\nimport { PaginatedView, PaginatedViewRef } from 'native-x-paginated-view'\nimport { DiscoverScreen, HomeScreen, UserProfileScreen } from '../screens'\n\nexport enum HomeScreenTab {\n  HOME,\n  DISCOVER,\n  PROFILE,\n}\n\nexport function MainScreen() {\n  const [tab, setTab] = useState\u003cHomeScreenTab\u003e(HomeScreenTab.HOME)\n  const paginatedViewRef = useRef\u003cPaginatedViewRef\u003e()\n\n  useEffect(() =\u003e {\n    paginatedViewRef?.current?.goto(tab)\n  }, [tab])\n\n  return (\n    \u003cScreen scrollable\u003e\n      \u003cPaginatedView ref={paginatedViewRef} onIndexChange={setTab}\u003e\n        \u003cHomeScreen /\u003e\n        \u003cDiscoverScreen /\u003e\n        \u003cUserProfileScreen /\u003e\n      \u003c/PaginatedView\u003e\n      \u003cTabHeader tab={tab} onChange={setTab} /\u003e\n    \u003c/Screen\u003e\n  )\n}\n```\n\n## API\n\n| Property                                 | Default Value | Usage                                                                               |\n| ---------------------------------------- | ------------- | ----------------------------------------------------------------------------------- |\n| children: ReactNode[]                    |               | Content of the paginated view                                                       |\n| style?: ViewStyle                        |               | Container style                                                                     |\n| scrollEnabled?: boolean                  | true          | Set to true to enable scroll                                                        |\n| animated?: boolean                       | true          | Animate transition between views                                                    |\n| showsHorizontalScrollIndicator?: boolean | false         | Set to true to show indicator                                                       |\n| onIndexChange?: (index: number) =\u003e void  |               | Callback for index change                                                           |\n| keepAlreadyRendered?: boolean            | true          | If set to true, all paged once rendered will be cached                              |\n| cachePageCount?: number                  | 3             | Number of pages to cache at any time (works only if `keepAlreadyRendered` is false) |\n| containerWidth?: number                  | Screen Size   | Width of the container. By default this is set to screen size                       |\n| dynamicWidth?: boolean                   | false         | Set this to true for the component to calculate width of the content as it changes  |\n\n## Automatic Release\n\nHere is an example of the release type that will be done based on a commit messages:\n\n| Commit message      | Release type          |\n| ------------------- | --------------------- |\n| fix: [comment]      | Patch Release         |\n| feat: [comment]     | Minor Feature Release |\n| perf: [comment]     | Major Feature Release |\n| doc: [comment]      | No Release            |\n| refactor: [comment] | No Release            |\n| chore: [comment]    | No Release            |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frintoj%2Fnative-x-paginated-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frintoj%2Fnative-x-paginated-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frintoj%2Fnative-x-paginated-view/lists"}