1.0.3 • Published 1 year ago

react-native-carousel-banner v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

react-native-carousel-banner

a cross-platform (iOS, Android, Web) react native carousel component

npm npm.io GitHub issues NPM npm.io npm.io

react-native-carousel-banner is a React Native component for building a cross-platform carousel.

Highlighted Features:

  1. Cross Platform - uniform behaviors among iOS, Android and Web
  2. Loop Cycle - support head-to-tail / tail-to-head loop cycle
  3. Auto Play - auto play with smooth transition

Install

yarn add react-native-carousel-banner

Usage

a minimally-configured carousel

import Carousel from 'react-native-carousel-banner';

const DATA = '/images/0.jpg', '/images/1.jpg', '/images/2.jpg', ;

Props

Basic Props

PropTypeDefaultDescription
datastring[][]the item data
heightnumber170height of image
roundedSizenumber0borderRadius of image
autoplaybooleantruedetermine whether the auto play mode is enabled or not
autoplayIntervalnumber5000delay between item transitions in milliseconds
dotColorstring#f97316index dot backgroundColor
onChangefunctionnullcallback of index changed

Props of onChange

PropTypeDefaultDescription
currentIndexnumber0the current page number
totalnumber0the total number of pages

License

MIT

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago