# react-native-carousel

> Simple carousel component for react-native

Latest version **0.12.0** (published 2019-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-carousel
pnpm add react-native-carousel
yarn add react-native-carousel
bun add react-native-carousel
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.12.0 |
| Published | 2019-10-11 |
| First published | 2015-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 450 |
| Author | Nick Poulden |
| Maintainers | nick_p |
| Keywords | react-native, carousel |

## Links

- npm: https://www.npmjs.com/package/react-native-carousel
- Repository: https://github.com/nick/react-native-carousel
- Issues: https://github.com/nick/react-native-carousel/issues
- npm.io page: https://npm.io/package/react-native-carousel

## Dependencies (2)

- [react-timer-mixin](https://npm.io/package/react-timer-mixin.md) ^0.13.3
- [@react-native-community/viewpager](https://npm.io/package/@react-native-community/viewpager.md) ^1.1.7

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 0.12.0 (latest) — 2019-10-11
- 0.11.0 — 2017-10-23
- 0.10.0 — 2016-07-26
- 0.9.1 — 2016-07-26
- 0.9.0 — 2016-07-13
- 0.8.0 — 2016-05-16
- 0.7.0 — 2016-05-11
- 0.6.1 — 2016-04-20
- 0.6.0 — 2016-04-20
- 0.5.0 — 2016-04-15
- 0.4.6 — 2016-04-13
- 0.4.5 — 2016-02-18
- 0.4.4 — 2015-12-23
- 0.4.3 — 2015-12-10
- 0.4.2 — 2015-11-10
- … 10 more at https://npm.io/package/react-native-carousel/versions

## README

## Carousel component for react-native

### Installation
```bash
npm install react-native-carousel
```

### Properties

```js
hideIndicators={false} // Set to true to hide the indicators
indicatorColor="#FFFFFF" // Active indicator color
indicatorSize={20} // Indicator bullet size
indicatorSpace={15} // space between each indicator
inactiveIndicatorColor="#999999" // Inactive indicator color
indicatorAtBottom={true} // Set to false to show the indicators at the top
indicatorOffset={250} // Indicator relative position from top or bottom
onPageChange={callback} // Called when the active page changes
inactiveIndicatorText= '•' // Inactive indicator content ( You can customize to use any Unicode character )
indicatorText= '•' // Active indicator content ( You can customize to use any Unicode character )

animate={true} // Enable carousel autoplay
delay={1000} // Set Animation delay between slides
loop={true} // Allow infinite looped animation. Depends on Prop {...animate} set to true.
 
```

### Usage example

Assuming you have `npm install -g react-native-cli`, first generate an app:

    react-native init RNCarousel
    cd RNCarousel
    npm install react-native-carousel --save

Then paste the following into `RNCarousel/index.ios.js`:

```javascript
'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
} = React;

var Carousel = require('react-native-carousel');

var RNCarousel = React.createClass({
  render: function() {
    return (
      <Carousel width={375}>
        <View style={styles.container}>
          <Text>Page 1</Text>
        </View>
        <View style={styles.container}>
          <Text>Page 2</Text>
        </View>
        <View style={styles.container}>
          <Text>Page 3</Text>
        </View>
      </Carousel>
    );
  }
});

var styles = StyleSheet.create({
  container: {
    width: 375,
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: 'transparent',
  },
});

AppRegistry.registerComponent('RNCarousel', () => RNCarousel);
```

---
_Source: https://npm.io/package/react-native-carousel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
