# react-instagram-carousel

> carousel for React that like instagram story

Latest version **2.0.1** (published 2019-12-26) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2019-12-26 |
| First published | 2019-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 15.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | hktysk |
| Maintainers | hktysk |
| Keywords | react, instagram, carousel |

## Links

- npm: https://www.npmjs.com/package/react-instagram-carousel
- Repository: https://github.com/hktysk/react-instagram-carousel
- Homepage: https://github.com/hktysk/react-instagram-carousel#readme
- Issues: https://github.com/hktysk/react-instagram-carousel/issues
- npm.io page: https://npm.io/package/react-instagram-carousel

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [use-interval](https://npm.io/package/use-interval.md) ^1.1.0
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.149

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2019-12-26
- 2.0.0 — 2019-12-26
- 1.1.1 — 2019-12-21
- 1.1.0 — 2019-12-14
- 1.0.2 — 2019-12-09
- 1.0.1 — 2019-12-06

## README

<p align="center">
  <img src="https://github.com/hktysk/images/blob/master/react-instagram-carousel/screen-shot.png?raw=true">
</p>

# *react-instagram-carousel*
> carousel for React that like instagram story.

[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)

### Tech
* [Node.js](https://github.com/nodejs/node)
* [React](https://github.com/facebook/react)
* [TypeScript](https://github.com/microsoft/TypeScript)
* [webpack](https://github.com/webpack/webpack)
* [babel](https://github.com/babel/babel)
* [Jest](https://github.com/facebook/jest)
* [enzyme](https://github.com/airbnb/enzyme)

### Installation
```sh
npm install [--save-dev] react-instagram-carousel
```

### Usage
```js
import React from 'react';
import Carousel from 'react-instagram-carousel';

const images = [
  '/img/example1.jpg',
  '/img/example2.jpg',
  '/img/example3.jpg'
];

const App = () => {
  return (
    <div style={{width: '400px', height: '600px'}}>
      <Carousel images={images} />
    </div>
  );
}

export default App;
```

**TypeScript:**

```js
import React from 'react';
import Carousel from 'react-instagram-carousel';

const images: string[] = [
  '/img/example1.jpg',
  '/img/example2.jpg',
  '/img/example3.jpg'
];

const App: React.FC = () => {
  return (
    <div style={{width: '400px', height: '600px'}}>
      <Carousel images={images} />
    </div>
  );
}

export default App;
```

### Props
```js
<Carousel
  images={images}
  nextMsec={3000}
  barHeight={3}
  backgroundSize={'contain'}
  backgroundColor={'white'} />
```
| Props | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| images | string[] |  | Yes | URL for images. must length 2 or more. |
| nextMsec | number | 5000 | No | time until next image. unit is msec. |
| barHeight | number | 1.5 | No | height for progress bar. unit is px. |
| backgroundSize | 'cover' or 'contain' | 'cover' | No | background-size property for CSS. |
| backgroundColor | string | #202322 | No | background-color property for CSS. |

### Example
```sh
$ git clone git://github.com/hktysk/react-instagram-carousel.git
$ cd react-instagram-carousel
$ npm install
$ npm start
```

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