1.0.2 • Published 5 years ago

promo-slider v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Promo Slider

React Native slider component with dismiss functionality. Demo 👉Expo Snack.

Install

npm i promo-slider -S

or,

yarn add promo-slider

Usage

Props:

PropertyDescriptionisRequired
slidesAn array of slide componentsyes
onCloseCallback which would be called after clicking on the close button on the last slide (e.g. remembering slider dismissal to async storage)no
dotColorThe active color of progress dot, by default it is #000 (inactive color has the same color, but 25% opaque)no
progressStylesOverride progress dots positioning. By default, progress dots are placed at the bottom of the componentno
withoutCloseA boolean which indicates weather close button should be shown on the last slideno
import PromoSlider from 'promo-slider';

  <PromoSlider
    onClose={() => console.log('It\'s closing time') || this.handleNotification()}
    dotColor="#000"
    progressStyles={{ bottom: 10 }}
    withoutClose={false}
    slides={[<SlideOneComponent>, <SlideTwoComponent>, <SlideThreeComponent>]}
  />

TODO

  • Provide previous/back actions
  • Improve style override for progress component
  • Add tests

Suggestions?

Shoot me an email, or submit an issue 🚀