2.0.2 • Published 4 years ago

@app-elements/carousel v2.0.2

Weekly downloads
105
License
ISC
Repository
github
Last release
4 years ago

Carousel

Simple (P)React carousel with arrows and dot indicators.

Installation

npm install --save @app-elements/carousel

Usage

import Carousel from '@app-elements/carousel'

const items = ['fff', 'a7c', '09d', '411', '111']

<Carousel withDots>
  {items.map(hex => (
    <Image
      src={`http://www.placehold.it/400x300/${hex}/f44?text=${hex}`}
      unloadedSrc={`http://www.placehold.it/400x300/eee/eee?text=Loading`}
      style='width: 100%'
    />
  ))}
</Carousel>

Props

PropTypeDefaultDescription
classNameString'carousel-slide'className given to each slide element.
wrapperClassString''className given to top-level carousel div.
noNavBooleanfalseSet to true to skip rendering prev/next elements.
withDotsBooleanfalseIf true, renders indicator dots below slides.
activeNumber0The active slide, must be an index of one of the children.
toleranceNumber100Tolerance for detecting touch swipes.
childrenArrayNoneEach child is one of the slides in the Carousel.
2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.0-alpha.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago