๐ŸŽ  Looped carousel for React Native
JavaScript
dependabot[bot] and phil-r Bump eslint from 4.19.1 to 5.0.0 (#208)
Bumps [eslint](https://github.com/eslint/eslint) from 4.19.1 to 5.0.0.
<details>
<summary>Release notes</summary>

*Sourced from [eslint's releases](https://github.com/eslint/eslint/releases).*

> ## v5.0.0
> [Release blogpost](https://eslint.org/blog/2018/06/eslint-v5.0.0-released)
> 
> [Migration guide](https://eslint.org/docs/user-guide/migrating-to-5.0.0)
> 
> * 0feedfd New: Added max-lines-per-function rule (fixes [#9842](https://github-redirect.dependabot.com/eslint/eslint/issues/9842)) ([#10188](https://github-redirect.dependabot.com/eslint/eslint/issues/10188)) (peteward44)
> * daefbdb Upgrade: eslint-scope and espree to 4.0.0 (refs [#10458](https://github-redirect.dependabot.com/eslint/eslint/issues/10458)) ([#10500](https://github-redirect.dependabot.com/eslint/eslint/issues/10500)) (Brandon Mills)
> * 077358b Docs: no-process-exit: recommend process.exitCode ([#10478](https://github-redirect.dependabot.com/eslint/eslint/issues/10478)) (Andres Kalle)
> * f93d6ff Fix: do not fail on unknown operators from custom parsers (fixes [#10475](https://github-redirect.dependabot.com/eslint/eslint/issues/10475)) ([#10476](https://github-redirect.dependabot.com/eslint/eslint/issues/10476)) (Rubรฉn Norte)
> * 05343fd Fix: add parens for yield statement (fixes [#10432](https://github-redirect.dependabot.com/eslint/eslint/issues/10432)) ([#10468](https://github-redirect.dependabot.com/eslint/eslint/issues/10468)) (Pig Fang)
> * d477c5e Fix: check destructuring for "no-shadow-restricted-names" (fixes [#10467](https://github-redirect.dependabot.com/eslint/eslint/issues/10467)) ([#10470](https://github-redirect.dependabot.com/eslint/eslint/issues/10470)) (Pig Fang)
> * 7a7580b Update: Add considerPropertyDescriptor option to func-name-matching ([#9078](https://github-redirect.dependabot.com/eslint/eslint/issues/9078)) (Dieter Luypaert)
> * e0a0418 Fix: crash on optional catch binding ([#10429](https://github-redirect.dependabot.com/eslint/eslint/issues/10429)) (Toru Nagashima)
> * de4dba9 Docs: styling team members ([#10460](https://github-redirect.dependabot.com/eslint/eslint/issues/10460)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 5e453a3 Docs: display team members in tables. ([#10433](https://github-redirect.dependabot.com/eslint/eslint/issues/10433)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * b1895eb Docs: Restore intentional spelling mistake ([#10459](https://github-redirect.dependabot.com/eslint/eslint/issues/10459)) (Wilfred Hughes)
> 
> ## v5.0.0-rc.0
> * abf400d Update: Add ignoreDestructing option to camelcase rule (fixes [#9807](https://github-redirect.dependabot.com/eslint/eslint/issues/9807)) ([#10373](https://github-redirect.dependabot.com/eslint/eslint/issues/10373)) (Andrew Lunny)
> * e2b394d Upgrade: espree and eslint-scope to rc versions ([#10457](https://github-redirect.dependabot.com/eslint/eslint/issues/10457)) (Kevin Partington)
> * a370da2 Chore: small opt to improve readability ([#10241](https://github-redirect.dependabot.com/eslint/eslint/issues/10241)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 640bf07 Update: Fixes multiline no-warning-comments rule. (fixes [#9884](https://github-redirect.dependabot.com/eslint/eslint/issues/9884)) ([#10381](https://github-redirect.dependabot.com/eslint/eslint/issues/10381)) (Scott Stern)
> * 831c39a Build: Adding rc release script to package.json ([#10456](https://github-redirect.dependabot.com/eslint/eslint/issues/10456)) (Kevin Partington)
> * dc4075e Update: fix false negative in no-use-before-define (fixes [#10227](https://github-redirect.dependabot.com/eslint/eslint/issues/10227)) ([#10396](https://github-redirect.dependabot.com/eslint/eslint/issues/10396)) (Toru Nagashima)
> * 3721841 Docs: Add new experimental syntax policy to README (fixes [#9804](https://github-redirect.dependabot.com/eslint/eslint/issues/9804)) ([#10408](https://github-redirect.dependabot.com/eslint/eslint/issues/10408)) (Kevin Partington)
> * d0aae3c Docs: Create docs landing page ([#10453](https://github-redirect.dependabot.com/eslint/eslint/issues/10453)) (Kevin Partington)
> * fe8bec3 Fix: fix writing config file when `source` is `prompt` ([#10422](https://github-redirect.dependabot.com/eslint/eslint/issues/10422)) (Pig Fang)
> * 917108d Update: Add requireParamType option to valid-jsdoc (fixes [#6753](https://github-redirect.dependabot.com/eslint/eslint/issues/6753)) ([#10220](https://github-redirect.dependabot.com/eslint/eslint/issues/10220)) (Tomasz Sterna)
> * 1984c21 Docs: move custom parsers docs into a page (fixes [#9919](https://github-redirect.dependabot.com/eslint/eslint/issues/9919)) ([#10431](https://github-redirect.dependabot.com/eslint/eslint/issues/10431)) (Pig Fang)
> * 400d4b5 Docs: Add rest and spread operator changes to migration guide ([#10416](https://github-redirect.dependabot.com/eslint/eslint/issues/10416)) (Yannick Croissant)
> * e7bdd02 Upgrade: Consume espree@4.0.0-alpha.1 ([#10410](https://github-redirect.dependabot.com/eslint/eslint/issues/10410)) (Kevin Partington)
> * 3e9f33a Fix: prevent crashing from JSON parsing error (fixes [#10364](https://github-redirect.dependabot.com/eslint/eslint/issues/10364)) ([#10376](https://github-redirect.dependabot.com/eslint/eslint/issues/10376)) (Pig Fang)
> * 636457d Fix: parse later ES files in `eslint --init` (fixes [#10003](https://github-redirect.dependabot.com/eslint/eslint/issues/10003)) ([#10378](https://github-redirect.dependabot.com/eslint/eslint/issues/10378)) (Pig Fang)
> 
> ## v5.0.0-alpha.4
> * ce3e62a Docs: remove test coverage badge ([#10407](https://github-redirect.dependabot.com/eslint/eslint/issues/10407)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 240c1a4 Fix: prefer-const object destructuring false positive (fixes [#9108](https://github-redirect.dependabot.com/eslint/eslint/issues/9108)) ([#10368](https://github-redirect.dependabot.com/eslint/eslint/issues/10368)) (Pig Fang)
> * 93c9a52 Update: config-validator should validate overrides ([#10357](https://github-redirect.dependabot.com/eslint/eslint/issues/10357)) (Toru Nagashima)
> * c2e0398 Update: Improves the prefer-object-spread rule by removing extraneous visitors ([#10351](https://github-redirect.dependabot.com/eslint/eslint/issues/10351)) (Sharmila Jesupaul)
> * d848949 Update: Support JSXFragment node (fixes [#9662](https://github-redirect.dependabot.com/eslint/eslint/issues/9662)) ([#9664](https://github-redirect.dependabot.com/eslint/eslint/issues/9664)) (Clement Hoang)
> * f268128 Build: add Node v10 to travis ([#10262](https://github-redirect.dependabot.com/eslint/eslint/issues/10262)) (alberto)
> * 9c922ce Update: Add "consistent" option to array-element-newline (fixes [#9457](https://github-redirect.dependabot.com/eslint/eslint/issues/9457)) ([#10355](https://github-redirect.dependabot.com/eslint/eslint/issues/10355)) (Pig Fang)
> * 65bce3a Fix: ensure --stdin flag works when stdin is piped asynchronously ([#10393](https://github-redirect.dependabot.com/eslint/eslint/issues/10393)) (Teddy Katz)
> * b9b23a9 Chore: rm unused argument ([#10400](https://github-redirect.dependabot.com/eslint/eslint/issues/10400)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 8b7a70c Fix: handle one-var with no semicolon (fixes [#10330](https://github-redirect.dependabot.com/eslint/eslint/issues/10330)) ([#10371](https://github-redirect.dependabot.com/eslint/eslint/issues/10371)) (Malcolm Groves)
> * 465e615 New: prompt users before installing dependencies ([#10353](https://github-redirect.dependabot.com/eslint/eslint/issues/10353)) (Pig Fang)
> * e25fc22 Chore: remove assert.doesNotThrow in tests ([#10199](https://github-redirect.dependabot.com/eslint/eslint/issues/10199)) (Ruben Bridgewater)
> * fb148aa Fix: allow no tokens after `return` keyword (fixes [#10372](https://github-redirect.dependabot.com/eslint/eslint/issues/10372)) ([#10379](https://github-redirect.dependabot.com/eslint/eslint/issues/10379)) (Pig Fang)
> * 074bc1c Docs: polish for max-classes-per-file rule ([#10377](https://github-redirect.dependabot.com/eslint/eslint/issues/10377)) (Pig Fang)
> * a812845 Fix: allow array spread for prefer-object-spread rule (fixes [#10344](https://github-redirect.dependabot.com/eslint/eslint/issues/10344)) ([#10347](https://github-redirect.dependabot.com/eslint/eslint/issues/10347)) (Pig Fang)
></table> ... (truncated)
</details>
<details>
<summary>Changelog</summary>

*Sourced from [eslint's changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md).*

> v5.0.0 - June 22, 2018
> 
> * 0feedfd New: Added max-lines-per-function rule (fixes [#9842](https://github-redirect.dependabot.com/eslint/eslint/issues/9842)) ([#10188](https://github-redirect.dependabot.com/eslint/eslint/issues/10188)) (peteward44)
> * daefbdb Upgrade: eslint-scope and espree to 4.0.0 (refs [#10458](https://github-redirect.dependabot.com/eslint/eslint/issues/10458)) ([#10500](https://github-redirect.dependabot.com/eslint/eslint/issues/10500)) (Brandon Mills)
> * 077358b Docs: no-process-exit: recommend process.exitCode ([#10478](https://github-redirect.dependabot.com/eslint/eslint/issues/10478)) (Andres Kalle)
> * f93d6ff Fix: do not fail on unknown operators from custom parsers (fixes [#10475](https://github-redirect.dependabot.com/eslint/eslint/issues/10475)) ([#10476](https://github-redirect.dependabot.com/eslint/eslint/issues/10476)) (Rubรฉn Norte)
> * 05343fd Fix: add parens for yield statement (fixes [#10432](https://github-redirect.dependabot.com/eslint/eslint/issues/10432)) ([#10468](https://github-redirect.dependabot.com/eslint/eslint/issues/10468)) (Pig Fang)
> * d477c5e Fix: check destructuring for "no-shadow-restricted-names" (fixes [#10467](https://github-redirect.dependabot.com/eslint/eslint/issues/10467)) ([#10470](https://github-redirect.dependabot.com/eslint/eslint/issues/10470)) (Pig Fang)
> * 7a7580b Update: Add considerPropertyDescriptor option to func-name-matching ([#9078](https://github-redirect.dependabot.com/eslint/eslint/issues/9078)) (Dieter Luypaert)
> * e0a0418 Fix: crash on optional catch binding ([#10429](https://github-redirect.dependabot.com/eslint/eslint/issues/10429)) (Toru Nagashima)
> * de4dba9 Docs: styling team members ([#10460](https://github-redirect.dependabot.com/eslint/eslint/issues/10460)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 5e453a3 Docs: display team members in tables. ([#10433](https://github-redirect.dependabot.com/eslint/eslint/issues/10433)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * b1895eb Docs: Restore intentional spelling mistake ([#10459](https://github-redirect.dependabot.com/eslint/eslint/issues/10459)) (Wilfred Hughes)
> 
> v5.0.0-rc.0 - June 9, 2018
> 
> * abf400d Update: Add ignoreDestructing option to camelcase rule (fixes [#9807](https://github-redirect.dependabot.com/eslint/eslint/issues/9807)) ([#10373](https://github-redirect.dependabot.com/eslint/eslint/issues/10373)) (Andrew Lunny)
> * e2b394d Upgrade: espree and eslint-scope to rc versions ([#10457](https://github-redirect.dependabot.com/eslint/eslint/issues/10457)) (Kevin Partington)
> * a370da2 Chore: small opt to improve readability ([#10241](https://github-redirect.dependabot.com/eslint/eslint/issues/10241)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 640bf07 Update: Fixes multiline no-warning-comments rule. (fixes [#9884](https://github-redirect.dependabot.com/eslint/eslint/issues/9884)) ([#10381](https://github-redirect.dependabot.com/eslint/eslint/issues/10381)) (Scott Stern)
> * 831c39a Build: Adding rc release script to package.json ([#10456](https://github-redirect.dependabot.com/eslint/eslint/issues/10456)) (Kevin Partington)
> * dc4075e Update: fix false negative in no-use-before-define (fixes [#10227](https://github-redirect.dependabot.com/eslint/eslint/issues/10227)) ([#10396](https://github-redirect.dependabot.com/eslint/eslint/issues/10396)) (Toru Nagashima)
> * 3721841 Docs: Add new experimental syntax policy to README (fixes [#9804](https://github-redirect.dependabot.com/eslint/eslint/issues/9804)) ([#10408](https://github-redirect.dependabot.com/eslint/eslint/issues/10408)) (Kevin Partington)
> * d0aae3c Docs: Create docs landing page ([#10453](https://github-redirect.dependabot.com/eslint/eslint/issues/10453)) (Kevin Partington)
> * fe8bec3 Fix: fix writing config file when `source` is `prompt` ([#10422](https://github-redirect.dependabot.com/eslint/eslint/issues/10422)) (Pig Fang)
> * 917108d Update: Add requireParamType option to valid-jsdoc (fixes [#6753](https://github-redirect.dependabot.com/eslint/eslint/issues/6753)) ([#10220](https://github-redirect.dependabot.com/eslint/eslint/issues/10220)) (Tomasz Sterna)
> * 1984c21 Docs: move custom parsers docs into a page (fixes [#9919](https://github-redirect.dependabot.com/eslint/eslint/issues/9919)) ([#10431](https://github-redirect.dependabot.com/eslint/eslint/issues/10431)) (Pig Fang)
> * 400d4b5 Docs: Add rest and spread operator changes to migration guide ([#10416](https://github-redirect.dependabot.com/eslint/eslint/issues/10416)) (Yannick Croissant)
> * e7bdd02 Upgrade: Consume espree@4.0.0-alpha.1 ([#10410](https://github-redirect.dependabot.com/eslint/eslint/issues/10410)) (Kevin Partington)
> * 3e9f33a Fix: prevent crashing from JSON parsing error (fixes [#10364](https://github-redirect.dependabot.com/eslint/eslint/issues/10364)) ([#10376](https://github-redirect.dependabot.com/eslint/eslint/issues/10376)) (Pig Fang)
> * 636457d Fix: parse later ES files in `eslint --init` (fixes [#10003](https://github-redirect.dependabot.com/eslint/eslint/issues/10003)) ([#10378](https://github-redirect.dependabot.com/eslint/eslint/issues/10378)) (Pig Fang)
> 
> v5.0.0-alpha.4 - May 28, 2018
> 
> * ce3e62a Docs: remove test coverage badge ([#10407](https://github-redirect.dependabot.com/eslint/eslint/issues/10407)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 240c1a4 Fix: prefer-const object destructuring false positive (fixes [#9108](https://github-redirect.dependabot.com/eslint/eslint/issues/9108)) ([#10368](https://github-redirect.dependabot.com/eslint/eslint/issues/10368)) (Pig Fang)
> * 93c9a52 Update: config-validator should validate overrides ([#10357](https://github-redirect.dependabot.com/eslint/eslint/issues/10357)) (Toru Nagashima)
> * c2e0398 Update: Improves the prefer-object-spread rule by removing extraneous visitors ([#10351](https://github-redirect.dependabot.com/eslint/eslint/issues/10351)) (Sharmila Jesupaul)
> * d848949 Update: Support JSXFragment node (fixes [#9662](https://github-redirect.dependabot.com/eslint/eslint/issues/9662)) ([#9664](https://github-redirect.dependabot.com/eslint/eslint/issues/9664)) (Clement Hoang)
> * f268128 Build: add Node v10 to travis ([#10262](https://github-redirect.dependabot.com/eslint/eslint/issues/10262)) (alberto)
> * 9c922ce Update: Add "consistent" option to array-element-newline (fixes [#9457](https://github-redirect.dependabot.com/eslint/eslint/issues/9457)) ([#10355](https://github-redirect.dependabot.com/eslint/eslint/issues/10355)) (Pig Fang)
> * 65bce3a Fix: ensure --stdin flag works when stdin is piped asynchronously ([#10393](https://github-redirect.dependabot.com/eslint/eslint/issues/10393)) (Teddy Katz)
> * b9b23a9 Chore: rm unused argument ([#10400](https://github-redirect.dependabot.com/eslint/eslint/issues/10400)) (่–›ๅฎš่ฐ”็š„็Œซ)
> * 8b7a70c Fix: handle one-var with no semicolon (fixes [#10330](https://github-redirect.dependabot.com/eslint/eslint/issues/10330)) ([#10371](https://github-redirect.dependabot.com/eslint/eslint/issues/10371)) (Malcolm Groves)
> * 465e615 New: prompt users before installing dependencies ([#10353](https://github-redirect.dependabot.com/eslint/eslint/issues/10353)) (Pig Fang)
> * e25fc22 Chore: remove assert.doesNotThrow in tests ([#10199](https://github-redirect.dependabot.com/eslint/eslint/issues/10199)) (Ruben Bridgewater)
> * fb148aa Fix: allow no tokens after `return` keyword (fixes [#10372](https://github-redirect.dependabot.com/eslint/eslint/issues/10372)) ([#10379](https://github-redirect.dependabot.com/eslint/eslint/issues/10379)) (Pig Fang)
> * 074bc1c Docs: polish for max-classes-per-file rule ([#10377](https://github-redirect.dependabot.com/eslint/eslint/issues/10377)) (Pig Fang)
> * a812845 Fix: allow array spread for prefer-object-spread rule (fixes [#10344](https://github-redirect.dependabot.com/eslint/eslint/issues/10344)) ([#10347](https://github-redirect.dependabot.com/eslint/eslint/issues/10347)) (Pig Fang)
> * 448fc52 Docs: Update link to Integrations / Build tools / Start ([#10354](https://github-redirect.dependabot.com/eslint/eslint/issues/10354)) (Kir Belevich)
></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`36ced0a`](eslint/eslint@36ced0a) 5.0.0
- [`5fd5632`](eslint/eslint@5fd5632) Build: changelog update for 5.0.0
- [`0feedfd`](eslint/eslint@0feedfd) New: Added max-lines-per-function rule (fixes [#9842](https://github-redirect.dependabot.com/eslint/eslint/issues/9842)) ([#10188](https://github-redirect.dependabot.com/eslint/eslint/issues/10188))
- [`daefbdb`](eslint/eslint@daefbdb) Upgrade: eslint-scope and espree to 4.0.0 (refs [#10458](https://github-redirect.dependabot.com/eslint/eslint/issues/10458)) ([#10500](https://github-redirect.dependabot.com/eslint/eslint/issues/10500))
- [`077358b`](eslint/eslint@077358b) Docs: no-process-exit: recommend process.exitCode ([#10478](https://github-redirect.dependabot.com/eslint/eslint/issues/10478))
- [`f93d6ff`](eslint/eslint@f93d6ff) Fix: do not fail on unknown operators from custom parsers (fixes [#10475](https://github-redirect.dependabot.com/eslint/eslint/issues/10475)) ([#10](https://github-redirect.dependabot.com/eslint/eslint/issues/10)...
- [`05343fd`](eslint/eslint@05343fd) Fix: add parens for yield statement (fixes [#10432](https://github-redirect.dependabot.com/eslint/eslint/issues/10432)) ([#10468](https://github-redirect.dependabot.com/eslint/eslint/issues/10468))
- [`d477c5e`](eslint/eslint@d477c5e) Fix: check destructuring for "no-shadow-restricted-names" (fixes [#10467](https://github-redirect.dependabot.com/eslint/eslint/issues/10467)) ([#10](https://github-redirect.dependabot.com/eslint/eslint/issues/10)...
- [`7a7580b`](eslint/eslint@7a7580b) Update: Add considerPropertyDescriptor option to func-name-matching ([#9078](https://github-redirect.dependabot.com/eslint/eslint/issues/9078))
- [`e0a0418`](eslint/eslint@e0a0418) Fix: crash on optional catch binding ([#10429](https://github-redirect.dependabot.com/eslint/eslint/issues/10429))
- Additional commits viewable in [compare view](eslint/eslint@v4.19.1...v5.0.0)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=eslint&package-manager=npm_and_yarn&previous-version=4.19.1&new-version=5.0.0)](https://dependabot.com/compatibility-score.html?dependency-name=eslint&package-manager=npm_and_yarn&previous-version=4.19.1&new-version=5.0.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
Latest commit b51a3f3 Jun 25, 2018

README.md

Looped carousel for React Native

NPM version Build Status Dependency Status devDependency Status

Full-fledged "infinite" carousel for your next react-native project. Supports iOS and Android.

Based on react-native framework by Facebook.

Demo

demo gif

Install

npm install react-native-looped-carousel --save

Examples

Props

Name propType default value description
autoplay boolean true enables auto animations
delay number 4000 number in milliseconds between auto animations
currentPage number 0 allows you to set initial page
pageStyle style null style for pages
contentContainerStyle style null contentContainerStyle for the scrollView
onAnimateNextPage func null callback that is called with 0-based Id of the current page
onPageBeingChanged func null callback that is called when scroll start with 0-based Id of the next page
swipe bool true motion control for Swipe
isLooped bool true if it's possible to scroll infinitely
Pagination --- --- ---
pageInfo boolean false shows {currentPage} / {totalNumberOfPages} pill at the bottom
pageInfoBackgroundColor string 'rgba(0, 0, 0, 0.25)' background color for pageInfo
pageInfoBottomContainerStyle style null style for the pageInfo container
pageInfoTextStyle style null style for text in pageInfo
pageInfoTextSeparator string ' / ' separator for {currentPage} and {totalNumberOfPages}
Bullets --- --- ---
bullets bool false wether to show "bullets" at the bottom of the carousel
bulletStyle style null style for each bullet
bulletsContainerStyle style null style for the bullets container
chosenBulletStyle style null style for the selected bullet
Arrows --- --- ---
arrows bool false wether to show navigation arrows for the carousel
arrowStyle style null style for navigation arrows
leftArrowStyle style null style for left navigation arrow
rightArrowStyle style null style for right navigation arrow
arrowsContainerStyle style null style for the navigation arrows container
leftArrowText string 'Left' label for left navigation arrow
rightArrowText string 'Right' label for right navigation arrow

Change the page

Three options :

  • Go to a specific page
  • Go to the next page
  • Go to the previous page
// assuming ref is set up on the carousel as (ref) => this._carousel = ref
onPress={() => {this._carousel.animateToPage(page)}}
onPress={() => {this._carousel._animateNextPage()}}
onPress={() => {this._carousel._animatePreviousPage()}}

Usage

import React, { Component } from 'react';
import {
  Text,
  View,
  Dimensions,
} from 'react-native';
import Carousel from 'react-native-looped-carousel';

const { width, height } = Dimensions.get('window');

export default class CarouselExample extends Component {

  constructor(props) {
    super(props);

    this.state = {
      size: { width, height },
    };
  }

  _onLayoutDidChange = (e) => {
    const layout = e.nativeEvent.layout;
    this.setState({ size: { width: layout.width, height: layout.height } });
  }

  render() {
    return (
      <View style={{ flex: 1 }} onLayout={this._onLayoutDidChange}>
        <Carousel
          delay={2000}
          style={this.state.size}
          autoplay
          pageInfo
          onAnimateNextPage={(p) => console.log(p)}
        >
          <View style={[{ backgroundColor: '#BADA55' }, this.state.size]}><Text>1</Text></View>
          <View style={[{ backgroundColor: 'red' }, this.state.size]}><Text>2</Text></View>
          <View style={[{ backgroundColor: 'blue' }, this.state.size]}><Text>3</Text></View>
        </Carousel>
      </View>
    );
  }
}

Used in

See also


More on react-native here: https://facebook.github.io/react-native/docs/getting-started.html