0.1.6 • Published 7 months ago

react-native-walkthrough-swiper v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

npm version

react-native-walkthrough-swiper

A Intro Swiper component for React-Native. Uses Reanimated API to create smooth animations.

Demo

Demo

Installation

npm  install  react-native-walkthrough-swiper
or
yarn add react-native-walkthrough-swiper

React Native Reanimated is essential for this and must be installed. Follow the installation steps here: react-native-reanimated

Usage

import { WalkthroughSwiper } from  'react-native-walkthrough-swiper';

// ...
<View style={{flex:1}}>
  <WalkthroughSwiper
      data={sliderData}
      skipText={'Skip'}
      skipTextStyle={{ color:  '#ccc' }}
      nextButton={<Text  style={{ color:  '#ccc' }}>{'Next'}</Text>}
      centerComponent={
      <Text  style={{ fontSize:  40, color:  'white' }}>{'Your App'}</Text>
      }
      titleStyle={{ color:  'white' }}
      subTitleStyle={{ color:  'white' }}
      activeSlideColor={'#fff'}
      inActiveSlideColor={'#b2b2b2'}
      onSkipBtnPress={() => {
      // Navigate to the next screen
      }}
  />
</View>

const data = [
{
    title: 'Slide 1',
    subTitle: 'Uses Reanimated API',
    age: 29,
    bgImage: 'some image URI',
  },
  ...
  ]
  

Properties

PropDescriptionTypes
dataSlide actual data, Should be in format. Check the format above.Array
skipTextString value of the skipText.string
skipTextStyleStyle for skipText.TextStyle
nextButtonNext Button. Can be text/image or any component.React.Component
centerComponentThe center component, can be any React componentReact.Component
titleStyleStyles for the title.TextStyle
subTitleStyleStyles for the sub-title.TextStyle
activeSlideColorActive Slide color (circle dot at bottom).string
inActiveSlideColorInactive slide color.string
onSkipBtnPressEvent to trigger on press of Skip Button.GestureResponderEvent

License

MIT