Coder Social home page Coder Social logo

cassaram09 / react-native-onboarding-swiper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jfilter/react-native-onboarding-swiper

0.0 1.0 0.0 776 KB

๐Ÿ›ณ Delightful Onboarding for your React-Native App

Home Page: https://www.npmjs.com/package/react-native-onboarding-swiper

License: Other

JavaScript 100.00%

react-native-onboarding-swiper's Introduction

<Onboarding /> npm npm

There are many ways to onboard people to your mobile app. But for React-Native, there is solely one component that is a) easy to setup and b) highly customizable: react-native-onboarding-swiper.

Your new users shouldn't jump in at the deep end. First give them a pleasurable, delightful introduction and only then let them explore your awesome app.

Getting everything running merely takes a minute. Don't believe me? Try it out!

Install

npm i react-native-onboarding-swiper
import Onboarding from 'react-native-onboarding-swiper';

Usage

<Onboarding
  pages={[
    {
      backgroundColor: '#fff',
      image: <Image source={require('./images/circle.png')} />,
      title: 'Onboarding',
      subtitle: 'Done with React Native Onboarding Swiper',
    },
    ...
  ]}
/>

Examples

Try out the the example running in your browser.

Also check out the three examples files: the simple example, the example with a Call-to-Action button or the example with custom button components.

Required Properties

  • pages (required): an array of pages in the following shape:
    • backgroundColor (required): a background color. The color of the font and dots adapts to the background color.
    • image (required): a component (e.g. <Image />) to display at the top of the page.
    • title (required): a string OR a React-Native component.
    • subtitle (required): a string OR a React-Native component.

Optional Properties

  • onSkip (optional): a callback that is fired if the Onboarding is skipped.
  • skipToPage (optional): when pressing skip, go the to that page (e.g. skipToPage={2}). If this prop is provided, ignores onSkip.
  • onDone (optional): a callback that is fired after the Onboarding is completed.
  • showSkip (optional): a bool flag indicating whether the Skip button is visible. Defaults to true.
  • showNext (optional): a bool flag indicating whether the Next button is visible. Defaults to true.
  • showDone (optional): a bool flag indicating whether the Done checkmark button is visible. Defaults to true.
  • skipLabel (optional): a string OR a React-Native component for the Skip label. Defaults to Skip.
  • nextLabel (optional): a string OR a React-Native component for the Skip label. Defaults to Next.
  • bottomBarHeight (optional): a number for the height of the bottom bar. Defaults to 60.
  • bottomBarHighlight (optional): a bool flag indicating whether the bottm bar should be highlighted. Defaults to true.
  • imageContainerStyles (optional): for a page in the pages array, you can override the default styles e.g. the paddingBottom of 60.
  • controlStatusBar (optional): a bool flag indicating whether the status bar should change with the background color. Defaults to true.
  • flatlistProps (optional): additional props for the FlatList which holds all the pages.
  • transitionAnimationDuration (optional): The duration in milliseconds for the animation of the background color for the page transition. Defaults to 500.

Custom Components Properties

You can also provide your own custom components for the buttons and the dots. All of them have access to a isLight prop but it's up to you what you do with it. Also checkout this example.

  • SkipButtonComponent (optional): Skip Button, gets skipLabel as prop.
  • NextButtonComponent (optional): Next Button, gets nextLabel as prop.
  • DoneButtonComponent (optional): Done Button.
  • DotComponent (optional): Dot for the pagination, gets selected as prop to indicate the active page.

Contributing

If you have a question, found a bug or want to propose a new feature, have a look at the issues page.

Pull requests are especially welcomed when they fix bugs or improve the code quality.

Acknowledgements

Built upon the work by Gosha Arinich which was originally inspired by AndroidOnboarder.

License

MIT.

react-native-onboarding-swiper's People

Contributors

jfilter avatar goshacmd avatar cassaram09 avatar nbolender avatar deadcoder0904 avatar bebax avatar nattatorn-dev avatar pjay79 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.