{"name":"@react-native-community/viewpager","version":"4.0.1","description":"React Native ViewPager native view","main":"js/index.js","types":"typings/index.d.ts","scripts":{"start":"node node_modules/react-native/local-cli/cli.js start","android":"react-native run-android --root=\"./example\"","ios":"react-native run-ios --project-path=\"./example/ios\"","test":"echo \"Error: no test specified\" && exit 1","flow":"flow","lint":"eslint .","lint:fix":"eslint . --fix --ext .js"},"keywords":["react-native","viewpager","view pager","tabs"],"author":{"name":"Ferran Negre Pizarro","email":"fnp.developer@gmail.com"},"homepage":"https://github.com/react-native-community/react-native-viewpager#readme","license":"MIT","repository":{"type":"git","url":"git+https://github.com/react-native-community/react-native-viewpager.git"},"peerDependencies":{"react":"^16.0","react-native":">=0.57"},"devDependencies":{"@react-native-community/eslint-config":"^0.0.5","babel-core":"^7.0.0-bridge.0","babel-jest":"24.1.0","babel-plugin-module-resolver":"^3.1.3","eslint":"^6.5.1","flow-bin":"^0.113.0","jest":"24.1.0","metro-react-native-babel-preset":"^0.58.0","react":"16.11.0","react-native":"0.62.2","react-test-renderer":"16.11.0"},"jest":{"preset":"react-native"},"gitHead":"0d3f946c409c7322b184aac6528be9b0c63f7738","bugs":{"url":"https://github.com/react-native-community/react-native-viewpager/issues"},"_id":"@react-native-community/viewpager@4.0.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-KtGGL0fxTvvwE95aakVR9+RvD3YYAYBqenFK9me1o7CQxSPzIdAtHaS26C7cfWTWrDIwjJAE7wQFkvnbfCmmhA==","shasum":"2136557c8ffb706b6d08c9329f19347b0a72b82d","tarball":"http://registry-npm.ywwl.com/@react-native-community/viewpager/download/@react-native-community/viewpager-4.0.1.tgz","fileCount":56,"unpackedSize":231551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3j4vCRA9TVsSAnZWagAAu7IP/0/PbVJCcSeV+c52aqM3\nk+32SrXeR2velfb+4zoi3LsxHJsAwJ+fyTnuTRsR7XOR4calq8TWzEy5QtML\n58+arXuGqtzIO98HX3a9G5UR97J2OeOpMlsJaKEnEB8E+mwHYmPStyx0aEZN\nhil68XVu1T/R9jmJmsA4jv26Za1vc3ivPVLYDVatdIURIcCxzlIxG52lBM3x\nGMWvGeWpBMP4IiQ3yPLbGjuFQNZhZYKKCxyoEVzhOroeg+Ais+Vxy8Mo2QQM\nAgv4oP85t9W/2dZL2CHXDSaisVlO0JgUQc0OxHZBgSAqQbn1PT+UBbFvfDSs\nbfuhnqjYka5399QnkSve6a4FXTjZQWAT5nCBOzRfWs3ZbcXoitK5FnKluSTT\ncNpWpDIk56HdmuAltjQYdj6JbmYgxXsZJme2UTjKTq79pceUTPtzUlMUQf7N\nbfHyEWws3cgt+6ddnVAQmT1w0VzbZ/AKfi5RcuD7DI5DYm4qLmaUvMyAmdsj\n6mVWjZHJtWfy5MPyuXNz4oGQ3w9V+dVBBXItBhYKN6otk6UbX+vkgGZFDCBX\nabgEt6/XSglD5KkAMKWJXIbC9XUyTFNfijD+nNKlzBf65EOSoIqXKXuGeYbO\nyT3gOt79NABhQGl3JDV/ZYk1Rf2hoe+ErSnZ5R4HbjkQmHGqASzigE5TY26x\nOKT+\r\n=Txyy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH2ZH3sRqBamzVRta35xf5HA7awyLMdsWyveHhKFiKxICIDAZe/77hOOT4LqRpx5mjgEOIeK6iPzeYXHoMvfDFo5C"}],"size":102532,"noattachment":false,"key":"/@react-native-community/viewpager/-/@react-native-community/viewpager-4.0.1.tgz"},"maintainers":[{"email":"fnp.developer@gmail.com","name":"ferrannp"},{"email":"ptrocki@gmail.com","name":"trozee"}],"_npmUser":{"name":"trozee","email":"ptrocki@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/viewpager_4.0.1_1591623214599_0.9798220268205928"},"_hasShrinkwrap":false,"deprecated":"This library is no longer supported. Please use react-native-pager-view instead","readme":"# react-native-viewpager <img src=\"docs/viewpager-logo.png\" alt=\"ViewPager\" width=\"24\" height=\"24\">\n\n[![CircleCI branch](https://img.shields.io/circleci/build/github/callstack/react-native-viewpager/master.svg)](https://circleci.com/gh/callstack/react-native-viewpager/tree/master)\n[![npm package](https://badge.fury.io/js/%40react-native-community%2Fviewpager.svg)](https://badge.fury.io/js/%40react-native-community%2Fviewpager)\n[![Lean Core Extracted](https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg)](https://github.com/facebook/react-native/issues/23313)\n[![License](https://img.shields.io/github/license/react-native-community/react-native-viewpager?color=blue)](https://github.com/callstack/react-native-viewpager/blob/master/LICENSE)\n\nThis component allows the user to swipe left and right through pages of data. Under the hood it is using the native [Android ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager) and the [iOS UIPageViewController](https://developer.apple.com/documentation/uikit/uipageviewcontroller) implementations. [See it in action!](https://github.com/react-native-community/react-native-viewpager#preview)\n\n<br/>\n<p align=\"center\">\n  <img src=\"docs/vp-carousel.gif\" alt=\"ViewPager\" width=\"300\">\n</p>\n\n<br/>\n\n## Versions\n\n| 3.x                | ~~4.0.x, 4.1.x~~  | >= 4.2.x                                                                                            | 5.x\n| -------------      | -------------     | -------------                                                                                       | -------------       |\n| iOS support        | Deprecated        | iOS support                                                                                         | iOS support         |\n| ViewPager1 support | Deprecated        | [Reverted to 3.3.0](https://github.com/callstack/react-native-viewpager/issues/233#issue-711000654) | ViewPager2 support  |\n\n## Getting started\n\n`yarn add @react-native-community/viewpager`\n\n## Linking\n\n### >= 0.60\n\nAutolinking will just do the job.\n\n### < 0.60\n\n#### Mostly automatic\n\n`react-native link @react-native-community/viewpager`\n\n#### Manual linking\n\n<details>\n<summary>Manually link the library on iOS</summary>\n</br>\n\nFollow the [instructions in the React Native documentation](https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking) to manually link the framework or link using [Cocoapods](https://cocoapods.org) by adding this to your `Podfile`:\n\n```ruby\npod 'react-native-viewpager', :path => '../node_modules/@react-native-community/viewpager'\n```\n\n</details>\n\n<details>\n<summary>Manually link the library on Android</summary>\n</br>\nMake the following changes:\n\n#### `android/settings.gradle`\n\n```groovy\ninclude ':@react-native-community_viewpager'\nproject(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android')\n```\n\n#### `android/app/build.gradle`\n\n```groovy\ndependencies {\n   ...\n   implementation project(':@react-native-community_viewpager')\n}\n```\n\n#### `android/app/src/main/.../MainApplication.java`\n\nOn top, where imports are:\n\n```java\nimport com.reactnativecommunity.viewpager.RNCViewPagerPackage;\n```\n\nAdd the `RNCViewPagerPackage` class to your list of exported packages.\n\n```java\n@Override\nprotected List<ReactPackage> getPackages() {\n  return Arrays.<ReactPackage>asList(\n    new MainReactPackage(),\n    new RNCViewPagerPackage()\n  );\n}\n```\n\n</details>\n\n## Usage\n\n```js\nimport React from 'react';\nimport {StyleSheet, View, Text} from 'react-native';\nimport ViewPager from '@react-native-community/viewpager';\n\nconst MyPager = () => {\n  return (\n    <ViewPager style={styles.viewPager} initialPage={0}>\n      <View key=\"1\">\n        <Text>First page</Text>\n      </View>\n      <View key=\"2\">\n        <Text>Second page</Text>\n      </View>\n    </ViewPager>\n  );\n};\n\nconst styles = StyleSheet.create({\n  viewPager: {\n    flex: 1,\n  },\n});\n```\n\n**Attention:** Note that you can only use `View` components as children of `ViewPager` (cf. folder */example*)\n. For Android if `View` has own children, set prop `collapsable` to false <https://reactnative.dev/docs/view#collapsable>, otherwise react-native might remove those children views and  and it's children will be rendered as separate pages\n\n## Advanced usage\n\nFor advanced usage please take a look into our [example project](https://github.com/callstack/react-native-viewpager/blob/master/example/src/BasicViewPagerExample.tsx)\n\n## API\n\n|Prop|Description|Platform|\n|-|:-----:|:---:|\n|`initialPage`|Index of initial page that should be selected|both\n|`scrollEnabled: boolean`|Should viewpager scroll, when scroll enabled|both\n|`onPageScroll: (e: PageScrollEvent) => void`|Executed when transitioning between pages (ether because the animation for the requested page has changed or when the user is swiping/dragging between pages)|both\n|`onPageScrollStateChanged: (e: PageScrollStateChangedEvent) => void`|Function called when the page scrolling state has changed|both\n|`onPageSelected: (e: PageSelectedEvent) => void`|This callback will be called once the ViewPager finishes navigating to the selected page|both\n|`pageMargin: number`|Blank space to be shown between pages|both\n|`keyboardDismissMode: ('none' / 'on-drag')`| Determines whether the keyboard gets dismissed in response to a drag|both\n|`orientation: Orientation`|Set `horizontal` or `vertical` scrolling orientation (it does **not** work dynamically)|both\n|`transitionStyle: TransitionStyle`|Use `scroll` or `curl` to change transition style (it does **not** work dynamically)|iOS\n|`showPageIndicator: boolean`|Shows the dots indicator at the bottom of the view|iOS\n|`overScrollMode: OverScollMode`|Used to override default value of overScroll mode. Can be `auto`, `always` or `never`. Defaults to `auto`|Android\n|`offscreenPageLimit: number`|Set the number of pages that should be retained to either side of the currently visible page(s). Pages beyond this limit will be recreated from the adapter when needed. Defaults to RecyclerView's caching strategy. The given value must either be larger than 0.|Android\n|`overdrag: boolean`|Allows for overscrolling after reaching the end or very beginning or pages|iOS\n\n## Development workflow\n\nTo get started with the project, run `yarn bootstrap` in the root directory to install the required dependencies.\n\n```sh\nyarn bootstrap\n```\n\nWhile developing, you can run the example to check your changes\n\n```sh\ncd example\nyarn android\nyarn ios\n```\n\nBefore sending a pull rquest, make sure your code passes TypeScript and ESLint. Run the following to verify:\n\n```sh\nyarn typescript\nyarn lint\n```\n\nTo fix formatting errors, run the following:\n\n```sh\nyarn lint --fix\n```\n\n## Preview\n\n### Android\n\nhorizontal                 |  vertical\n:-------------------------:|:-------------------------:\n<img src=\"docs/android-viewpager.gif\" alt=\"ViewPager\" width=\"325\"> |  <img src=\"docs/android-viewpager-vertical.gif\" alt=\"ViewPager\" width=\"325\">\n\n### iOS\n\nhorizontal - scroll      |  horizontal - curl\n:-------------------------:|:-------------------------:\n<img src=\"docs/ios-viewpager-scroll.gif\" alt=\"ViewPager\" width=\"325\">  |  <img src=\"docs/ios-viewpager-curl.gif\" alt=\"ViewPager\" width=\"325\">\n\nvertical - scroll        |  vertical - curl\n:-------------------------:|:-------------------------:\n<img src=\"docs/ios-viewpager-vertical.gif\" alt=\"ViewPager\" width=\"325\">  |  <img src=\"docs/ios-viewpager-vertical-curl.gif\" alt=\"ViewPager\" width=\"325\">\n","publish_time":1591623214687,"_cnpm_publish_time":1591623214687,"dist-tags":{"latest":"5.0.11","next":"5.0.7"}}