{"bugs":{"url":"https://github.com/callstack/react-native-viewpager/issues"},"dist":{"shasum":"397a5b849535a26e3a42481be87ad820750320d5","tarball":"https://registry.npmjs.org/@react-native-community/viewpager/-/viewpager-5.0.7.tgz","fileCount":64,"integrity":"sha512-L/DFXHMp8suusrelz5ZuCs0HIEoHnHdHxgrvpS+k8ztvsdENq3Jv5u2ADLxmIhhmGx9dK4jbok1AS1RlE3iF8w==","signatures":[{"sig":"MEQCIA7i64dwUJhLlRp41Oz/UWaXUAkt2DJLwP/PFgbdfv1qAiA0O5/3QErCl0pec2waevgVLGmn9S8da6TOETBrjTqeAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":181188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgK+fUCRA9TVsSAnZWagAAS6QP+QFbvTSNRgfv6SqEaxqo\nk2AJs1H+fqkASjj6Zxr5s7GnnDB1QQraxG7Bs94ZuwP+/8+Uqr3LemXenv7r\n3wBq/NZy1JwIFuaVcCFV1IPhf5/zzUgidC3lCUvJT6i4YNJneZkKJED0bYvF\nal97UuYTpIB8XwzswI5lxwTCa5Mv8c5pS1Qqk2uNGZPUTMRza8OxMUufDGmo\n62lDKTRUqem6mHS/fxq60C3xWJF/DFPPQToaa1jhzIBHBRS7Mk1/95feAd0X\nhlreie3UQ9Y++MAh0052FS+N66DmCbIFFzqy4hAaA3jX4qDDgBZHJye4FkgQ\n4VE7jbQ4WJXi36TAWpOSA5Wuxphdl3+PLJFB03bAMgribgQXcHRJMegu5FOo\n7QA2Spr7hBbAVbGH29ArgP3cgE+qJa5vv39QWwtcO0fQkieJcNAs29J7bI0V\nMZu+f1CAXMKrltqMAZEXpS1flWRjNEqdk+RiH1kw9X9A0hVsV/QZRh1JAri6\n3kgCq8vmckc5eiTMj0svl/5OKoXeOczM7syPVFOa4wNhjdodHY/G9ExOmAfg\nJOhbdJ4j4IXrNBC+r20P1OD2PKr4EF3/4YvTGrM8I62FhRMgibqGs4wBuJkb\nNhoSx56rCVI9FstjtbSeDAQoQyzW0ZluATkShywkckqXumwxCLTO73VD/wZa\nbYpP\r\n=rcsm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","name":"@react-native-community/viewpager","husky":{"hooks":{"pre-commit":"yarn lint && yarn typescript"}},"types":"lib/typescript/src/index.d.ts","author":{"url":"https://github.com/callstack","name":"troZee","email":"hello@callstack.com"},"module":"lib/module/index","readme":"# react-native-viewpager\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<img src=\"docs/viewpager-logo.png\" alt=\"ViewPager\" width=\"500\" height=\"500\">\n\n## Versions\n\n| 1.x              | 2.x              | 3.x              | 4.0.x, 4.1.x       | >= 4.2.x                                                                                               |\n| ---------------- | -------------    | -------------    | -------------      | -------------                                                                                       |\n|                  | iOS support      | iOS support      | iOS support        | iOS support                                                                                         |\n| Android support  | Android support  | AndroidX support | ViewPager2 support | [Reverted to 3.3.0](https://github.com/callstack/react-native-viewpager/issues/233#issue-711000654) |\n\n\n## Experimental version\n\n[ViewPager2](https://developer.android.com/jetpack/androidx/releases/viewpager2) for Android uses another implementation than ViewPager1, hence it caused lots of issues. You can try experimental version using below command \n\n`yarn add @react-native-community/viewpager@next`\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</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```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```groovy\ndependencies {\n   ...\n   implementation project(':@react-native-community_viewpager')\n}\n```\n\n#### `android/app/src/main/.../MainApplication.java`\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</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## 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## 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","source":"src/index","gitHead":"b6f1ad6f7fbb5844656cf3ecbbe34cb3215019d9","license":"MIT","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example && pod-install --quiet","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"yarn example && yarn && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"trozee","email":"ptrocki@gmail.com"},"homepage":"https://github.com/callstack/react-native-viewpager#readme","keywords":["react-native","ios","android"],"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"deprecated":"This library is no longer supported. Please use react-native-pager-view instead","repository":{"url":"git+https://github.com/callstack/react-native-viewpager.git","type":"git"},"_npmVersion":"6.14.6","description":"React Native wrapper for Android and iOS ViewPager","directories":{},"maintainers":[{"name":"ferrannp","email":"fnp.developer@gmail.com"},{"name":"trozee","email":"ptrocki@gmail.com"}],"_nodeVersion":"10.22.0","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.0.1","husky":"^4.2.5","react":"16.13.1","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^8.3.5","release-it":"^13.5.8","typescript":"^3.8.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^17.0.0","react-native":"0.63.4","@types/react-native":"0.63.37","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","@react-native-community/bob":"^0.16.2","@commitlint/config-conventional":"^8.3.4","@release-it/conventional-changelog":"^1.1.4","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/viewpager_5.0.7_1613490131692_0.4278554981856826","host":"s3://npm-registry-packages"},"@react-native-community/bob":{"output":"lib","source":"src","targets":["commonjs","module","typescript"]},"_id":"@react-native-community/viewpager@5.0.7","version":"5.0.7"}