1.0.4 • Published 5 years ago

rn-onboarding v1.0.4

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

rn-onboarding

An easy to use package to handle user onboarding flow to a react native app.

How to install and use this package

To install this package you can run the following command;

npm i rn-onboarding

or

yarn add rn-onboarding

  import {View} from 'react-native';
  import RNonboarding from 'rn-onboarding';

  const App = () => {
    const pages = {
      first: {
        showSkip: true,
        headerText: 'First Screen',
        bodyText: 'Lorem ipsum dolor sit amet',
      },
      second: {
        showSkip: true,
        headerText: 'Second Screen',
        bodyText: 'Lorem ipsum dolor sit amet.',
      },
      third: {
        showSkip: false,
        headerText: 'Third Screen',
        bodyText: 'Lorem ipsum dolor sit amet.',
      }
    };
    return (
      <View style={{flex: 1}}>
        <OnboardingScreen pages={pages} firstPageKey={'first'} />
      </View>
    );
  }

example code

Component Props

Prop NameRequireddefaultExample
pagestruenullconst pages = { first: {showSkip: false, headerText: 'Lorem'}};
firstPageKeytruenull'first'
containerStylefalse{}
bodyStylefalse{}
topBarStylefalse{}
arrowTopRightStylefalse{}
centerImageStylefalse{}
titleStylefalse{}
circleStylefalse{}
topBarRightTextStylefalse{}
activeCircleColorfalse#F58F99
circleContainerfalse{}
inActiveCircleColorfalsergba(38, 0, 87, 0.2)
customTopBarfalseReact.Component
onPressNextfalsenull
onPageChangefalse() => {}returns the current page displayed

Author

David Okonji @davidokonji

Contribution

Open to contributions, please raise a pull request to contribute.

Open Source Licence

MIT License