{"id":3932,"url":"https://github.com/FuYaoDe/react-native-app-intro","last_synced_at":"2025-08-03T23:34:17.268Z","repository":{"id":41271412,"uuid":"57112772","full_name":"FuYaoDe/react-native-app-intro","owner":"FuYaoDe","description":"react-native-app-intro is a react native component implementing a parallax effect welcome page using base on react-native-swiper , similar to the one found in Google's app like Sheet, Drive, Docs...","archived":false,"fork":false,"pushed_at":"2021-11-02T02:35:55.000Z","size":10686,"stargazers_count":3248,"open_issues_count":82,"forks_count":507,"subscribers_count":55,"default_branch":"master","last_synced_at":"2024-11-24T06:09:43.873Z","etag":null,"topics":["android","intro","introduction","ios","parallax","react-native"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FuYaoDe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-26T08:49:57.000Z","updated_at":"2024-11-23T12:47:25.000Z","dependencies_parsed_at":"2022-07-13T15:59:41.914Z","dependency_job_id":null,"html_url":"https://github.com/FuYaoDe/react-native-app-intro","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuYaoDe%2Freact-native-app-intro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuYaoDe%2Freact-native-app-intro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuYaoDe%2Freact-native-app-intro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuYaoDe%2Freact-native-app-intro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FuYaoDe","download_url":"https://codeload.github.com/FuYaoDe/react-native-app-intro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228170757,"owners_count":17880178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","intro","introduction","ios","parallax","react-native"],"created_at":"2024-01-05T20:16:55.713Z","updated_at":"2024-12-07T07:30:52.960Z","avatar_url":"https://github.com/FuYaoDe.png","language":"JavaScript","funding_links":[],"categories":["Components","Stale","组件","JavaScript","Libraries","Others"],"sub_categories":["UI","React Native \u0026 Expo"],"readme":"# react-native-app-intro\nreact-native-app-intro is a react native component implementing a parallax effect welcome page using base on [react-native-swiper](https://github.com/leecade/react-native-swiper) , similar to the one found in Google's app like Sheet, Drive, Docs...\n\n# react-native-app-intro Screen Capture\n\n[Example code](https://github.com/FuYaoDe/react-native-app-intro/tree/master/Example)\n\n### Support ios、android\n\u003cimg src=\"http://i.giphy.com/3o6ozjLoOnYTXfzJgQ.gif\"\u003e\n\u003cimg src=\"http://gifyu.com/images/android.gif\" width=\"345\"\u003e\n\n\u003ca href=\"http://www.freepik.com\"\u003eDesigned by Freepik\u003c/a\u003e\n\n### Installation\n\n```bash\n$ npm i react-native-app-intro --save\n```\n\n### Basic Usage\n\nYou can use pageArray quick generation your app intro with parallax effect. With the basic usage, the Android status bar will be updated to match your slide background color.\n\n\u003cimg src=\"http://i.giphy.com/l3V0khy22aUviTTaM.gif\"\u003e\n\u003cimg src=\"./assets/sample-android.gif\" width=\"280\"\u003e\n\n```javascript\nimport React, { Component } from 'react';\nimport { AppRegistry, Alert } from 'react-native';\nimport AppIntro from 'react-native-app-intro';\n\nclass Example extends Component {\n  onSkipBtnHandle = (index) =\u003e {\n    Alert.alert('Skip');\n    console.log(index);\n  }\n  doneBtnHandle = () =\u003e {\n    Alert.alert('Done');\n  }\n  nextBtnHandle = (index) =\u003e {\n    Alert.alert('Next');\n    console.log(index);\n  }\n  onSlideChangeHandle = (index, total) =\u003e {\n    console.log(index, total);\n  }\n  render() {\n    const pageArray = [{\n      title: 'Page 1',\n      description: 'Description 1',\n      img: 'https://goo.gl/Bnc3XP',\n      imgStyle: {\n        height: 80 * 2.5,\n        width: 109 * 2.5,\n      },\n      backgroundColor: '#fa931d',\n      fontColor: '#fff',\n      level: 10,\n    }, {\n      title: 'Page 2',\n      description: 'Description 2',\n      img: require('../assets/some_image.png'),\n      imgStyle: {\n        height: 93 * 2.5,\n        width: 103 * 2.5,\n      },\n      backgroundColor: '#a4b602',\n      fontColor: '#fff',\n      level: 10,\n    }];\n    return (\n      \u003cAppIntro\n        onNextBtnClick={this.nextBtnHandle}\n        onDoneBtnClick={this.doneBtnHandle}\n        onSkipBtnClick={this.onSkipBtnHandle}\n        onSlideChange={this.onSlideChangeHandle}\n        pageArray={pageArray}\n      /\u003e\n    );\n  }\n}\n\nAppRegistry.registerComponent('Example', () =\u003e Example);\n```\n\n### Advanced Usage\n\nIf you need customized page like my Example, you can  pass in `View` component into AppIntro component and set level. Remember any need use parallax effect component, Need to be `\u003cView level={10}\u003e\u003c/View\u003e` inside.\n\n\u003cimg src=\"http://i.giphy.com/26AHwds1g5HjXrd4s.gif\"\u003e\n\n```javascript\nimport React, { Component } from 'react';\nimport {\n  AppRegistry,\n  StyleSheet,\n  Text,\n  View,\n} from 'react-native';\nimport AppIntro from 'react-native-app-intro';\n\nconst styles = StyleSheet.create({\n  slide: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#9DD6EB',\n    padding: 15,\n  },\n  text: {\n    color: '#fff',\n    fontSize: 30,\n    fontWeight: 'bold',\n  },\n});\n\nclass Example extends Component {\n\n  render() {\n    return (\n      \u003cAppIntro\u003e\n        \u003cView style={[styles.slide,{ backgroundColor: '#fa931d' }]}\u003e\n          \u003cView level={10}\u003e\u003cText style={styles.text}\u003ePage 1\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={15}\u003e\u003cText style={styles.text}\u003ePage 1\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={8}\u003e\u003cText style={styles.text}\u003ePage 1\u003c/Text\u003e\u003c/View\u003e\n        \u003c/View\u003e\n        \u003cView style={[styles.slide, { backgroundColor: '#a4b602' }]}\u003e\n          \u003cView level={-10}\u003e\u003cText style={styles.text}\u003ePage 2\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={5}\u003e\u003cText style={styles.text}\u003ePage 2\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={20}\u003e\u003cText style={styles.text}\u003ePage 2\u003c/Text\u003e\u003c/View\u003e\n        \u003c/View\u003e\n        \u003cView style={[styles.slide,{ backgroundColor: '#fa931d' }]}\u003e\n          \u003cView level={8}\u003e\u003cText style={styles.text}\u003ePage 3\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={0}\u003e\u003cText style={styles.text}\u003ePage 3\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={-10}\u003e\u003cText style={styles.text}\u003ePage 3\u003c/Text\u003e\u003c/View\u003e\n        \u003c/View\u003e\n        \u003cView style={[styles.slide, { backgroundColor: '#a4b602' }]}\u003e\n          \u003cView level={5}\u003e\u003cText style={styles.text}\u003ePage 4\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={10}\u003e\u003cText style={styles.text}\u003ePage 4\u003c/Text\u003e\u003c/View\u003e\n          \u003cView level={15}\u003e\u003cText style={styles.text}\u003ePage 4\u003c/Text\u003e\u003c/View\u003e\n        \u003c/View\u003e\n      \u003c/AppIntro\u003e\n    );\n  }\n}\nAppRegistry.registerComponent('Example', () =\u003e Example);\n```\n\nAnd in Android, image inside view component, view need width、height.\n```javascript\n\u003cView style={{\n  position: 'absolute',\n  top: 80,\n  left: 30,\n  width: windows.width,\n  height: windows.height,\n}} level={20}\n\u003e\n  \u003cImage style={{ width: 115, height: 70 }} source={require('./img/1/c2.png')} /\u003e\n\u003c/View\u003e\n```\n\n## **Properties**\n| Prop           | PropType | Default Value           | Description                                                                                                                                                                                                                                                                                                                                                      |\n|----------------|----------|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| dotColor       | string   | 'rgba(255,255,255,0.3)' | Bottom of the page dot color                                                                                                                                                                                                                                                                                                                                     |\n| activeDotColor | string   | '#fff'                  | Active page index dot color                                                                                                                                                                                                                                                                                                                                      |\n| rightTextColor | string   | '#fff'                  | The bottom right Text `Done、\u003e` color                                                                                                                                                                                                                                                                                                                            |\n| leftTextColor  | string   | '#fff'                  | The bottom left Text `Skip` color                                                                                                                                                                                                                                                                                                                                |\n| onSlideChange  | (index, total) =\u003e {} |                         | function to call when the pages change                                                                                                                                                                                                                                                                                                                           |\n| onSkipBtnClick | (index) =\u003e {}     |                         | function to call when the Skip button click                                                                                                                                                                                                                                                                                                                      |\n| onDoneBtnClick | func     |                         | function to call when the Done button click                                                                                                                                                                                                                                                                                                                      |\n| onNextBtnClick | (index) =\u003e {}     |                         | function to call when the Next '\u003e' button click                                                                                                                                                                                                                                                                                                                  |\n| doneBtnLabel   | string、Text element  |  Done                   | The bottom right custom Text label                                                                                                                                                                                                                                                                                                                   |\n| skipBtnLabel   | string、Text element  |  Skip                   | The bottom left custom Text label                                                                                                                                                                                                                                                                                                                  |\n| nextBtnLabel   | string、Text element   |  ›                      | The bottom left custom Text label                                                                                                                                                                                                                                                                                                                  |\n| pageArray      | array    |                         | In the basic usage, you can input object array to render basic view example: ```[[{title: 'Page 1', description: 'Description 1', img: 'https://goo.gl/uwzs0C', imgStyle: {height: 80 * 2.5, width: 109 * 2.5 }, backgroundColor: '#fa931d', fontColor: '#fff', level: 10 }]``` , level is parallax effect level ,if you use pageArray you can't use custom view |\n| defaultIndex | number   | 0 | number of the index of the initial index |\n| showSkipButton | bool | true | a boolean defining if we should render the skip button |\n| showDoneButton | bool | true | a boolean that defines if we should render the done button |\n| showDots | bool | true | a boolean that defines if we should render the bottom dots |\n\n##### **Children View Properties**\n| Prop  | PropType | Default Value | Description           |\n|-------|----------|---------------|-----------------------|\n| level | number   |               | parallax effect level |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFuYaoDe%2Freact-native-app-intro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFuYaoDe%2Freact-native-app-intro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFuYaoDe%2Freact-native-app-intro/lists"}