├── .eslintrc.js
├── .gitignore
├── .npmignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── demo
├── demo.gif
├── simple1.png
├── simple2.png
└── simple3.png
├── examples
├── CustomButtons.js
├── Eula.js
├── Simple.js
├── WithCTA.js
└── images
│ ├── circle.png
│ ├── square.png
│ └── triangle.png
├── package-lock.json
├── package.json
└── src
├── Dot.js
├── Dots.js
├── Page.js
├── Pagination.js
├── buttons
├── DoneButton.js
├── NextButton.js
├── SkipButton.js
├── SymbolButton.js
├── TextButton.js
└── util.js
└── index.js
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | parser: 'babel-eslint',
3 | extends: ['airbnb', 'prettier'],
4 | plugins: ['react', 'react-native', 'jsx-a11y', 'import', 'prettier'],
5 | parserOptions: {
6 | ecmaVersion: 6,
7 | ecmaFeatures: {
8 | jsx: true,
9 | },
10 | sourceType: 'module',
11 | },
12 | rules: {
13 | 'react/jsx-filename-extension': 'off',
14 | 'no-underscore-dangle': 'off',
15 | 'arrow-body-style': 'off',
16 | 'react/jsx-wrap-multilines': 'off',
17 | 'jsx-a11y/href-no-hash': 'off',
18 | 'global-require': 'off',
19 | 'prettier/prettier': [
20 | 'error',
21 | {
22 | singleQuote: true,
23 | trailingComma: 'es5',
24 | },
25 | ],
26 | },
27 | globals: {
28 | fetch: false,
29 | require: false,
30 | __DEV__: false,
31 | },
32 | };
33 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
50 |
51 | fastlane/report.xml
52 | fastlane/Preview.html
53 | fastlane/screenshots
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | demo
2 | examples
3 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.1.1 (April 15, 2020)
2 |
3 | * fix RTL
4 | * use `useNativeDrive` for RN v0.62+
5 |
6 | ## 1.1.0 (May 01, 2019)
7 |
8 | * add more props for special cases
9 |
10 | ## 1.0.0 (January 04, 2019)
11 |
12 | * stable release (no changes)
13 |
14 | ## 0.10.0 (November 25, 2018)
15 |
16 | * override default pages styles
17 |
18 | ## 0.9.0 (October 29, 2018)
19 |
20 | * add `pageIndexCallback` to get the page index on change
21 |
22 | ## 0.8.0 (October 21, 2018)
23 |
24 | * add props for title's styles
25 | * fix font scaling for symbol buttons
26 |
27 | ## 0.7.0 (July 27, 2018)
28 |
29 | * add some more props and re-work how the statusbar color gets reset to default
30 |
31 | ## 0.6.0 (April 08, 2018)
32 |
33 | * iPhone X support (thanks to @nbolender)
34 | * new props: `flatlistProps` and `controlStatusBar`
35 | * fade-in animation for `Done` button
36 |
37 | ## 0.5.0 (March 24, 2018)
38 |
39 | * allow customization of image container styles
40 | * fix several propTypes warnings
41 |
42 | ## 0.4.0 (February 23, 2018)
43 |
44 | * Listen to orientation changes and adjust content appropiatly
45 | * Add animations between page chagnes
46 | * Make buttons, dots etc. adjustable via a wide range of different props
47 | * Change next arrow to text button `next`.
48 |
49 | ## 0.3.0 (October 18, 2017)
50 |
51 | * Increase touchable Radius for Buttons
52 |
53 | ## 0.2.0 (October 16, 2017)
54 |
55 | * Change name to `react-native-onboarding-swiper`
56 | * Change from ScrollView to FlatList
57 | * Add `skipLabel` prop
58 | * Title and subtitle can be components
59 | * Change `onEnd` to `onSkip` and `onDone`
60 | * Remove check mark dot because it's not useful
61 | * Adapt StatusBar color
62 | * Refactor most of the internal components
63 |
64 | ## 0.1.1 (October 11, 2016)
65 |
66 | * Detect light background and adapt the text and controls to it.
67 | * Allow to disable the bottom bar overlay via the `bottomOverlay` prop.
68 | * Allow to disable either of the skip, next, or done buttons.
69 |
70 | ## 0.1.0 (October 10, 2016)
71 |
72 | Initial release.
73 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright for portions of react-native-onboarding-swiper are held by
4 | Gosha Arinich, 2016 as part of react-native-simple-onboarding.
5 | All other copyright for react-native-onboarding-swiper are held by
6 | Johannes Filter, 2017.
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all
16 | copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | SOFTWARE.
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # `` [](https://www.npmjs.com/package/react-native-onboarding-swiper) [](https://www.npmjs.com/package/react-native-onboarding-swiper)
2 |
3 | |  |  |  |
4 | | --------------------- | --------------------- | ------------------ |
5 |
6 |
7 | 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**:
8 | `react-native-onboarding-swiper`.
9 |
10 | 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.
11 |
12 | Getting everything running merely takes a minute. Try out the example [running in your browser](https://snack.expo.io/dlQTGD06P). Or check out this [tutorial on YouTube](https://www.youtube.com/watch?v=SMkR-iIGvwQ).
13 |
14 | ## Install
15 |
16 | ```bash
17 | npm i react-native-onboarding-swiper
18 | ```
19 |
20 | ```bash
21 | yarn add react-native-onboarding-swiper
22 | ```
23 |
24 | ## Usage
25 |
26 | ```js
27 | import Onboarding from 'react-native-onboarding-swiper';
28 |
29 | ,
34 | title: 'Onboarding',
35 | subtitle: 'Done with React Native Onboarding Swiper',
36 | },
37 | ...
38 | ]}
39 | />
40 | ```
41 |
42 | ## Examples
43 |
44 | Check out the three examples files: the [simple example](examples/Simple.js), the [example with a Call-to-Action button](examples/WithCTA.js) or the [example with custom button components](examples/CustomButtons.js).
45 |
46 | ## Required Properties
47 |
48 | * `pages` (required): an array of pages in the following shape:
49 | * `backgroundColor` (required): a background color. The color of the font and dots adapts to the background color.
50 | * `image` (required): a component (e.g. ``) to display at the top of the page.
51 | * `title` (required): a string **OR** a React-Native component.
52 | * `subtitle` (required): a string **OR** a React-Native component.
53 |
54 | ## Optional Properties
55 |
56 | ### Buttons
57 |
58 | * `nextLabel` (optional): a string **OR** a React-Native component for the Next label. Defaults to `Next`.
59 | * `showNext` (optional): a bool flag indicating whether the Next button is visible. Defaults to `true`.
60 | * `skipLabel` (optional): a string **OR** a React-Native component for the Skip label. Defaults to `Skip`.
61 | * `showSkip` (optional): a bool flag indicating whether the Skip button is visible. Defaults to `true`.
62 | * `onSkip` (optional): a callback that is fired if the Onboarding is skipped.
63 | * `skipToPage` (optional): when pressing skip, go to that page (e.g. `skipToPage={2}`). If this prop is provided, ignores `onSkip`.
64 | * `onDone` (optional): a callback that is fired after the Onboarding is completed.
65 | * `showDone` (optional): a bool flag indicating whether the Done checkmark button is visible. Defaults to `true`.
66 |
67 | ### General
68 |
69 | * `bottomBarHeight` (optional): a number for the height of the bottom bar. Defaults to `60`.
70 | * `bottomBarColor` (optional): backgroundColor of the bottom bar. Defaults to `transparent`.
71 | * `bottomBarHighlight` (optional): a bool flag indicating whether the bottom bar should be highlighted. Defaults to `true`.
72 | * `controlStatusBar` (optional): a bool flag indicating whether the status bar should change with the background color. Defaults to `true`.
73 | * `showPagination` (optional): whether to show the bottom pagination bar. Defaults to `true`.
74 | * `flatlistProps` (optional): additional props for the [FlatList](https://facebook.github.io/react-native/docs/flatlist.html) which holds all the pages.
75 | * `transitionAnimationDuration` (optional): The duration in milliseconds for the animation of the background color for the page transition. Defaults to `500`.
76 | * `allowFontScalingText` (optional): Font scaling can cause troubles with high-resolution screens. You may want to disable it. Defaults to `true`.
77 | * `allowFontScalingButtons` (optional): Font scaling can cause troubles with high-resolution screens. You may want to disable it. Defaults to `true`.
78 | * `pageIndexCallback` (optional): a function that receives the page `index` as a parameter on page change. [Example Usage](https://github.com/jfilter/react-native-onboarding-swiper/pull/40)
79 |
80 | ### Default Page Styles
81 |
82 | For the pages in the `pages` array, you can set the default styles (and override the styles set by this component).
83 |
84 | * `containerStyles` (optional): override the default container styles.
85 | * `imageContainerStyles` (optional): override the default image container styles e.g. the `paddingBottom` of 60.
86 | * `titleStyles` (optional): override the default title styles.
87 | * `subTitleStyles` (optional): override the default subtitle styles.
88 |
89 | ### Adjust Individual Page Styles
90 |
91 | For each page in the `pages` array, you can override the default page styles. [An example](examples/CustomButtons.js).
92 |
93 | * `titleStyles` (optional): modify styles of a specific page's title.
94 | * `subTitleStyles` (optional): modify styles of a specific page's subtitle.
95 |
96 | ## Custom Components Properties
97 |
98 | 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](examples/CustomButtons.js).
99 |
100 | * `SkipButtonComponent` (optional): Skip Button, gets `skipLabel` as prop.
101 | * `NextButtonComponent` (optional): Next Button, gets `nextLabel` as prop.
102 | * `DoneButtonComponent` (optional): Done Button.
103 | * `DotComponent` (optional): Dot for the pagination, gets `selected` as prop to indicate the active page.
104 |
105 | ## Controlling the pages imperatively
106 |
107 | You can control the Onboarding component imperatively with [useRef](https://reactjs.org/docs/hooks-reference.html#useref).
108 |
109 | ```js
110 | const onboardingRef = useRef(null);
111 |
112 |
116 |
117 | onboardingRef.current.goNext()
118 | onboardingRef.current.goToPage(2, true)
119 | onboardingRef.current.goToPage(2, false)
120 | ```
121 |
122 | Methods:
123 |
124 | * `goNext()` : Go to the next page.
125 | * `goToPage(pageIndex, animated)` : Go to the selected page.
126 |
127 | ## Contributing
128 |
129 | If you have a **question**, found a **bug** or want to propose a new **feature**, have a look at the [issues page](https://github.com/jfilter/react-native-onboarding-swiper/issues).
130 |
131 | **Pull requests** are especially welcomed when they fix bugs or improve the code quality.
132 |
133 | ## Related Work
134 |
135 | * https://github.com/jacse/react-native-app-intro-slider
136 | * https://github.com/gorhom/react-native-paper-onboarding
137 |
138 | ## Acknowledgements
139 |
140 | Built upon the work by [Gosha Arinich](https://github.com/goshakkk/react-native-simple-onboarding) which was originally inspired by [AndroidOnboarder](https://github.com/chyrta/AndroidOnboarder).
141 |
142 | ## License
143 |
144 | MIT.
145 |
--------------------------------------------------------------------------------
/demo/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jfilter/react-native-onboarding-swiper/d90f44d6d64d07bf10c92fce4abdd1b72f62bcac/demo/demo.gif
--------------------------------------------------------------------------------
/demo/simple1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jfilter/react-native-onboarding-swiper/d90f44d6d64d07bf10c92fce4abdd1b72f62bcac/demo/simple1.png
--------------------------------------------------------------------------------
/demo/simple2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jfilter/react-native-onboarding-swiper/d90f44d6d64d07bf10c92fce4abdd1b72f62bcac/demo/simple2.png
--------------------------------------------------------------------------------
/demo/simple3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jfilter/react-native-onboarding-swiper/d90f44d6d64d07bf10c92fce4abdd1b72f62bcac/demo/simple3.png
--------------------------------------------------------------------------------
/examples/CustomButtons.js:
--------------------------------------------------------------------------------
1 | import { Image, View } from 'react-native';
2 | import React from 'react';
3 | import { Button } from 'react-native-elements';
4 |
5 | import Onboarding from 'react-native-onboarding-swiper';
6 |
7 | const Square = ({ isLight, selected }) => {
8 | let backgroundColor;
9 | if (isLight) {
10 | backgroundColor = selected ? 'rgba(0, 0, 0, 0.8)' : 'rgba(0, 0, 0, 0.3)';
11 | } else {
12 | backgroundColor = selected ? '#fff' : 'rgba(255, 255, 255, 0.5)';
13 | }
14 | return (
15 |
23 | );
24 | };
25 |
26 | const backgroundColor = isLight => (isLight ? 'blue' : 'lightblue');
27 | const color = isLight => backgroundColor(!isLight);
28 |
29 | const Done = ({ isLight, ...props }) => (
30 |
43 | );
44 |
45 | const Skip = ({ isLight, skipLabel, ...props }) => (
46 |
60 | );
61 |
62 | const Next = ({ isLight, ...props }) => (
63 |
76 | );
77 |
78 | const CustomButtons = () => (
79 | ,
89 | title: 'Onboarding',
90 | subtitle: 'Done with React Native Onboarding Swiper',
91 | titleStyles: { color: 'red' }, // overwrite default color
92 | },
93 | {
94 | backgroundColor: '#fe6e58',
95 | image: ,
96 | title: 'The Title',
97 | subtitle: 'This is the subtitle that sumplements the title.',
98 | },
99 | {
100 | backgroundColor: '#999',
101 | image: ,
102 | title: 'Triangle',
103 | subtitle: "Beautiful, isn't it?",
104 | },
105 | ]}
106 | />
107 | );
108 |
109 | export default CustomButtons;
110 |
--------------------------------------------------------------------------------
/examples/Eula.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Platform, ScrollView, StyleSheet, Text, View } from "react-native";
3 | import { Button, Image } from "react-native-elements";
4 | import Onboarding from "react-native-onboarding-swiper";
5 |
6 | const Square = ({ isLight, selected }) => {
7 | let backgroundColor;
8 | if (isLight) {
9 | backgroundColor = selected ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.3)";
10 | } else {
11 | backgroundColor = selected ? "#fff" : "rgba(255, 255, 255, 0.5)";
12 | }
13 | return (
14 |
22 | );
23 | };
24 |
25 | const backgroundColor = isLight => (isLight ? "blue" : "lightblue");
26 | const color = isLight => backgroundColor(!isLight);
27 |
28 | const Done = ({ isLight, ...props }) => (
29 |
40 | );
41 |
42 | const Skip = ({ isLight, skipLabel, ...props }) => (
43 |
56 | );
57 |
58 | const Next = ({ isLight, ...props }) => (
59 |
70 | );
71 |
72 | /*
73 | * Screen is the onboarding component.
74 | * react-native-onboarding-swiper requires an image for every page, so we
75 | * provide an dummy View.
76 | */
77 | class Screen extends React.Component {
78 | render() {
79 | const { navigation } = this.props;
80 |
81 | return (
82 | {
89 | // navigate to main app experience
90 | }}
91 | titleStyles={{ fontSize: 44, fontWeight: "800" }}
92 | subTitleStyles={{ fontSize: 24 }}
93 | pages={[
94 | {
95 | backgroundColor: "#fff",
96 | image: ,
97 | title: "Foobar",
98 | subtitle: "new app for you"
99 | },
100 | {
101 | image: ,
102 | title: "apple",
103 | titleStyles: { color: "white" },
104 | subtitle: "apple for you"
105 | },
106 | {
107 | image: ,
108 | title: "Triangle",
109 | subtitle: "Triangle for you",
110 | },
111 | {
112 | backgroundColor: "#fff",
113 | image: ,
114 | title: "End-User License Agreement (EULA) of Foobar",
115 | titleStyles: { color: "black", fontSize: 16 },
116 | subtitle:
117 | }
118 | ]}
119 | />
120 | );
121 | }
122 | }
123 |
124 | const Eula = () => (
125 |
126 |
127 | This End-User License Agreement ("EULA") is a legal agreement between you
128 | and Foobar Inc.
129 |
130 |
131 | This EULA agreement governs your acquisition and use of our Foobar software
132 | ("Software") directly from Foobar Inc. or indirectly through a Foobar Inc.
133 | authorized reseller or distributor (a "Reseller").
134 |
135 |
136 | Please read this EULA agreement carefully before completing the
137 | installation process and using the Foobar software. It provides a license to
138 | use the Foobar software and contains warranty information and liability
139 | disclaimers.
140 |
141 |
142 | If you register for a free trial of the Foobar software, this EULA agreement
143 | will also govern that trial. By clicking "accept" or installing and/or
144 | using the Foobar software, you are confirming your acceptance of the
145 | Software and agreeing to become bound by the terms of this EULA agreement.
146 |
147 |
148 | If you are entering into this EULA agreement on behalf of a company or
149 | other legal entity, you represent that you have the authority to bind such
150 | entity and its affiliates to these terms and conditions. If you do not
151 | have such authority or if you do not agree with the terms and conditions
152 | of this EULA agreement, do not install or use the Software, and you must
153 | not accept this EULA agreement.
154 |
155 |
156 | This EULA agreement shall apply only to the Software supplied by Foobar Inc.
157 | herewith regardless of whether other software is referred to or described
158 | herein. The terms also apply to any Foobar Inc. updates, supplements,
159 | Internet-based services, and support services for the Software, unless
160 | other terms accompany those items on delivery. If so, those terms apply.
161 |
162 | License Grant
163 |
164 | Foobar Inc. hereby grants you a personal, non-transferable, non-exclusive
165 | licence to use the Foobar software on your devices in accordance with the
166 | terms of this EULA agreement.
167 |
168 |
169 | You are permitted to load the Foobar software (for example a PC, laptop,
170 | mobile or tablet) under your control. You are responsible for ensuring
171 | your device meets the minimum requirements of the Foobar software.
172 |
173 | You are not permitted to:
174 |
175 | • Edit, alter, modify, adapt, translate or otherwise change the whole or
176 | any part of the Software nor permit the whole or any part of the Software
177 | to be combined with or become incorporated in any other software, nor
178 | decompile, disassemble or reverse engineer the Software or attempt to do
179 | any such things
180 |
181 |
182 | • Reproduce, copy, distribute, resell or otherwise use the Software for
183 | any commercial purpose
184 |
185 |
186 | • Allow any third party to use the Software on behalf of or for the
187 | benefit of any third party
188 |
189 |
190 | • Use the Software in any way which breaches any applicable local,
191 | national or international law
192 |
193 |
194 | • Use the Software for any purpose that Foobar Inc. considers is a breach of
195 | this EULA agreement
196 |
197 | • Distribute objectionable content.
198 | • Abuse other users or behave in an abusive way.
199 | Intellectual Property and Ownership
200 |
201 | Foobar Inc. shall at all times retain ownership of the Software as
202 | originally downloaded by you and all subsequent downloads of the Software
203 | by you. The Software (and the copyright, and other intellectual property
204 | rights of whatever nature in the Software, including any modifications
205 | made thereto) are and shall remain the property of Foobar Inc..
206 |
207 |
208 | Foobar Inc. reserves the right to grant licences to use the Software to
209 | third parties.
210 |
211 | Termination
212 |
213 | This EULA agreement is effective from the date you first use the Software
214 | and shall continue until terminated. You may terminate it at any time upon
215 | written notice to Foobar Inc..
216 |
217 |
218 | It will also terminate immediately if you fail to comply with any term of
219 | this EULA agreement. Upon such termination, the licenses granted by this
220 | EULA agreement will immediately terminate and you agree to stop all access
221 | and use of the Software. The provisions that by their nature continue and
222 | survive will survive any termination of this EULA agreement.
223 |
224 | Governing Law
225 |
226 | This EULA agreement, and any dispute arising out of or in connection with
227 | this EULA agreement, shall be governed by and construed in accordance with
228 | the laws of us.
229 |
230 |
231 |
232 | );
233 |
234 | const styles = StyleSheet.create({
235 | eulaSubtitle: {
236 | fontSize: 18
237 | },
238 | });
239 |
240 | export default Screen;
241 |
--------------------------------------------------------------------------------
/examples/Simple.js:
--------------------------------------------------------------------------------
1 | import { Image } from 'react-native';
2 | import React from 'react';
3 |
4 | import Onboarding from 'react-native-onboarding-swiper';
5 |
6 | const Simple = () => (
7 | console.log('done')}
9 | pages={[
10 | {
11 | backgroundColor: '#fff',
12 | image: ,
13 | title: 'Onboarding',
14 | subtitle: 'Done with React Native Onboarding Swiper',
15 | },
16 | {
17 | backgroundColor: '#fe6e58',
18 | image: ,
19 | title: 'The Title',
20 | subtitle: 'This is the subtitle that sumplements the title.',
21 | },
22 | {
23 | backgroundColor: '#999',
24 | image: ,
25 | title: 'Triangle',
26 | subtitle: "Beautiful, isn't it?",
27 | },
28 | ]}
29 | />
30 | );
31 |
32 | export default Simple;
33 |
--------------------------------------------------------------------------------
/examples/WithCTA.js:
--------------------------------------------------------------------------------
1 | import { Alert, StatusBar } from 'react-native';
2 | import React from 'react';
3 |
4 | import { Button, Icon } from 'react-native-elements';
5 | import Onboarding from 'react-native-onboarding-swiper';
6 |
7 | const WithCTA = () => (
8 | Alert.alert('Skipped')}
11 | pages={[
12 | {
13 | title: 'Hey!',
14 | subtitle: 'Welcome to $App!',
15 | backgroundColor: '#003c8f',
16 | image: (
17 |
23 | ),
24 | },
25 | {
26 | title: 'Send Messages',
27 | subtitle: 'You can reach everybody with us',
28 | backgroundColor: '#5e92f3',
29 | image: (
30 |
36 | ),
37 | },
38 | {
39 | title: 'Get Notified',
40 | subtitle: 'We will send you notification as soon as something happened',
41 | backgroundColor: '#1565c0',
42 | image: (
43 |
44 | ),
45 | },
46 | {
47 | title: "That's Enough",
48 | subtitle: (
49 |