{"id":20414878,"url":"https://github.com/asifvora/rn-app-intro-screen","last_synced_at":"2025-07-05T15:13:54.404Z","repository":{"id":134925682,"uuid":"149410572","full_name":"asifvora/rn-app-intro-screen","owner":"asifvora","description":"Simple and configurable app introduction slider for react native.","archived":false,"fork":false,"pushed_at":"2018-09-24T13:05:23.000Z","size":899,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-09T04:34:31.490Z","etag":null,"topics":["intro","reactnative","screen","slider"],"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/asifvora.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-19T07:31:59.000Z","updated_at":"2019-04-12T05:59:55.000Z","dependencies_parsed_at":"2024-02-13T03:30:10.977Z","dependency_job_id":null,"html_url":"https://github.com/asifvora/rn-app-intro-screen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asifvora%2Frn-app-intro-screen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asifvora%2Frn-app-intro-screen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asifvora%2Frn-app-intro-screen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asifvora%2Frn-app-intro-screen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asifvora","download_url":"https://codeload.github.com/asifvora/rn-app-intro-screen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602281,"owners_count":21131614,"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":["intro","reactnative","screen","slider"],"created_at":"2024-11-15T06:13:11.894Z","updated_at":"2025-04-12T17:06:29.195Z","avatar_url":"https://github.com/asifvora.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ern-app-intro-screen\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eEasy-to-use yet very configurable app introduction slider/swiper\u003c/p\u003e\n\n```sh\nnpm i rn-app-intro-screen --save\n```\n\n| | |\n|-|-|\n![Button example gif](Images/button-example.gif) | ![Custom layout example gif](Images/custom-example.gif)\n\n## Table of contents\n  * [Usage](#usage)\n    * [Basic Example](#basic-example)\n    * [Configuring Buttons](#configuring-buttons)\n    * [Custom Slide Layout](#custom-slide-layout)\n  * [Props and options](#props-and-options)\n    * [Configure behaviour](#configure-behaviour)\n    * [Configure looks](#configure-looks)\n  * [Example](#example)\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\n### Basic example\n| No configuration | `showSkipButton` | `bottomButton` and `showSkipButton`\n|-|-|-|\n![Basic example gif](Images/basic-example.gif)|![showSkipButton example image](Images/skipbutton-example.jpg)|![bottomButton example image](Images/bottomskipbutton-example.jpg)\n\n```javascript\nimport React from 'react';\nimport { StyleSheet } from 'react-native';\nimport AppIntro from 'rn-app-intro-screen';\n\nconst styles = StyleSheet.create({\n  image: {\n    width: 320,\n    height: 320,\n  }\n});\n\nconst slides = [\n  {\n    key: 'somethun',\n    title: 'Title 1',\n    text: 'Description.\\nSay something cool',\n    image: require('./assets/1.jpg'),\n    imageStyle: styles.image,\n    backgroundColor: '#59b2ab',\n  },\n  {\n    key: 'somethun-dos',\n    title: 'Title 2',\n    text: 'Other cool stuff',\n    image: require('./assets/2.jpg'),\n    imageStyle: styles.image,\n    backgroundColor: '#febe29',\n  },\n  {\n    key: 'somethun1',\n    title: 'Rocket guy',\n    text: 'I\\'m already out of descriptions\\n\\nLorem ipsum bla bla bla',\n    image: require('./assets/3.jpg'),\n    imageStyle: styles.image,\n    backgroundColor: '#22bcb5',\n  }\n];\n\nexport default class App extends React.Component {\n  this.state = {\n    showRealApp: false\n  }\n  _onDone = () =\u003e {\n    // User finished the introduction. Show real app through\n    // navigation or simply by controlling state\n    this.setState({ showRealApp: true });\n  }\n  render() {\n    if (this.state.showRealApp) {\n      return \u003cApp /\u003e;\n    } else {\n      return \u003cAppIntro slides={slides} onDone={this._onDone}/\u003e;\n    }\n  }\n}\n```\n\n### Configuring buttons\n\n![Button example gif](Images/button-example.gif)\n\n```javascript\nimport React from 'react';\nimport { Ionicons } from '@expo/vector-icons';\nimport { StyleSheet, View } from 'react-native';\nimport AppIntro from 'rn-app-intro-screen';\n\nconst styles = StyleSheet.create({\n  buttonCircle: {\n    width: 40,\n    height: 40,\n    backgroundColor: 'rgba(0, 0, 0, .2)',\n    borderRadius: 20,\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n  image: {\n    width: 320,\n    height: 320,\n  }\n});\n\n// slides = [...]\n\nexport default class App extends React.Component {\n  _renderNextButton = () =\u003e {\n    return (\n      \u003cView style={styles.buttonCircle}\u003e\n        \u003cIonicons\n          name=\"md-arrow-round-forward\"\n          color=\"rgba(255, 255, 255, .9)\"\n          size={24}\n          style={{ backgroundColor: 'transparent' }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  }\n  _renderDoneButton = () =\u003e {\n    return (\n      \u003cView style={styles.buttonCircle}\u003e\n        \u003cIonicons\n          name=\"md-checkmark\"\n          color=\"rgba(255, 255, 255, .9)\"\n          size={24}\n          style={{ backgroundColor: 'transparent' }}\n        /\u003e\n      \u003c/View\u003e\n    );\n  }\n  render() {\n    return (\n      \u003cAppIntro\n        slides={slides}\n        renderDoneButton={this._renderDoneButton}\n        renderNextButton={this._renderNextButton}\n      /\u003e\n    );\n  }\n}\n```\n\n### Custom slide layout\n\n![Custom layout example gif](Images/custom-example.gif)\n\n```js\nimport React from 'react';\nimport { Ionicons } from '@expo/vector-icons';\nimport { StyleSheet, View, Text, Image } from 'react-native';\nimport { LinearGradient } from 'expo';\nimport AppIntro from 'rn-app-intro-screen';\n\nconst styles = StyleSheet.create({\n  mainContent: {\n    flex: 1,\n    alignItems: 'center',\n    justifyContent: 'space-around',\n  },\n  image: {\n    width: 320,\n    height: 320,\n  },\n  text: {\n    color: 'rgba(255, 255, 255, 0.8)',\n    backgroundColor: 'transparent',\n    textAlign: 'center',\n    paddingHorizontal: 16,\n  },\n  title: {\n    fontSize: 22,\n    color: 'white',\n    backgroundColor: 'transparent',\n    textAlign: 'center',\n    marginBottom: 16,\n  }\n});\n\nconst slides = [\n  {\n    key: 'somethun',\n    title: 'Quick setup, good defaults',\n    text: 'rn-app-intro-screen is easy to setup with a small footprint and no dependencies. And it comes with good default layouts!',\n    icon: 'ios-images-outline',\n    colors: ['#63E2FF', '#B066FE'],\n  },\n  {\n    key: 'somethun1',\n    title: 'Super customizable',\n    text: 'The component is also super customizable, so you can adapt it to cover your needs and wants.',\n    icon: 'ios-options-outline',\n    colors: ['#A3A1FF', '#3A3897'],\n  },\n  {\n    key: 'somethun2',\n    title: 'No need to buy me beer',\n    text: 'Usage is all free',\n    icon: 'ios-beer-outline',\n    colors: ['#29ABE2', '#4F00BC'],\n  },\n];\n\nexport default class App extends React.Component {\n  _renderItem = props =\u003e (\n    \u003cLinearGradient\n      style={[styles.mainContent, {\n        paddingTop: props.topSpacer,\n        paddingBottom: props.bottomSpacer,\n        width: props.width,\n        height: props.height,\n      }]}\n      colors={props.colors}\n      start={{x: 0, y: .1}} end={{x: .1, y: 1}}\n    \u003e\n      \u003cIonicons style={{ backgroundColor: 'transparent' }} name={props.icon} size={200} color=\"white\" /\u003e\n      \u003cView\u003e\n        \u003cText style={styles.title}\u003e{props.title}\u003c/Text\u003e\n        \u003cText style={styles.text}\u003e{props.text}\u003c/Text\u003e\n      \u003c/View\u003e\n    \u003c/LinearGradient\u003e\n  );\n\n  render() {\n    return (\n      \u003cAppIntro\n        slides={slides}\n        renderItem={this._renderItem}\n        bottomButton\n      /\u003e\n    );\n  }\n}\n```\nHere a custom `renderItem` is supplied and the `bottomButton`-props has been set to `true`. Notice how the setup of `slides` has been configured to support icons and gradient backgrounds.\n\n\u003ch2 align=\"center\"\u003eProps and options\u003c/h2\u003e\n\nThe component extends `FlatList` so all FlatList-props are valid.\n\n### Configure looks\n\nName             | Type       | Default                   | Description\n-----------------|------------|---------------------------|--------------\nskipLabel        | `string`   | `Skip`                    | Custom label for Skip button\ndoneLabel        | `string`   | `Done`                    | Custom label for Done button\nnextLabel        | `string`   | `Next`                    | Custom label for Next button\nprevLabel        | `string`   | `Back`                    | Custom label for Prev button\nbottomButton     | `boolean`  | `false`                   | Enable to show a full-width button under pagination\nbuttonStyle      | `style`    | `null`                    | Styling of outer button component\nbuttonTextStyle  | `style`    | `null`                    | Styling of button text component\ndotStyle         | `style`    | {backgroundColor: 'rgba(0, 0, 0, .2)'} | Style of inactive pagination dots\nactiveDotStyle   | `style`    | {backgroundColor: 'rgba(255, 255, 255, .9)'} | Style of active pagination dot\nhidePagination   | `boolean`  | `false`                   | Enable to hide the pagination\nrenderNextButton | `function` | renders a Text-component  | Use to supply your own next button\nrenderPrevButton | `function` | renders a Text-component  | Use to supply your own prev button\nrenderDoneButton | `function` | renders a Text-component  | Use to supply your own done button\nrenderSkipButton | `function` | renders a Text-component  | Use to supply your own skip button\nrenderItem       | `function` | renders `DefaultSlide`    | Function returning a slide. The function is passed the slide object as wells as `{ topSpacer: Number, bottomSpacer: Number }`. These show the \"safe-space\" where other UI is not interfering - take a look at `DefaultSlide.js` too see how they are set up.\n\n### Configure behavior\n\nName             | Type       | Default                   | Description\n-----------------|------------|---------------------------|--------------\nslides           | `object`   | No default, required      | An array of [slide-objects](#slide-object)\nshowSkipButton   | `boolean`  | `false`                   | Enable to show a skip button to the left of pagination dots. When `bottomButton == true` the skip button is a small text under the full-width next button\nshowPrevButton   | `boolean`  | `false`                   | Enable to show a previous button. If `showSkipButton` is true, the skip button will be displayed on the first page and prev button on subsequent one\nhideNextButton   | `boolean`  | `false`                   | Enable to hide the next button\nhideDoneButton   | `boolean`  | `false`                   | Enable to hide the done button\nonSlideChange    | `function` | `void`                    | Called when user goes changes slide (by swiping or pressing next/prev). Function called with arguments `index: number, lastIndex: number`\nonDone           | `function` | `void`                    | Called when user ends the introduction by pressing the done button\nonSkip           | `function` | `void`                    | Called when user presses the skip button\n\n#### slide object\nEach slide object should contain at least a unique `key`. If you use the default layouts your object should furthermore contain:\n\nName             | Type                | Note           \n-----------------|---------------------|---------------------\ntitle            | `string`            | The title\ntitleStyle       | `Style`-prop        | Styling for the title (e.g color, fontSize)\ntext             | `string`            | Main text of slide\ntextStyle        | `Style`-prop        | Styling for the text (e.g color, fontSize)\nimage            | `Image`-source prop | Slide image\nimageStyle       | `Style`-prop        | Styling for the image (e.g. size)\nbackgroundColor  | `string`            | Slide background color\n\nIf you use a custom `renderItem`-method you can design your slide objects as you see fit.\n\n\u003ch2 align=\"center\"\u003eExample\u003c/h2\u003e\n\nYou can run the example Expo-app by cloning the repo:\n\n\n```sh\ngit clone https://github.com/asifvora/rn-app-intro-screen.git\ncd rn-app-intro-screen/Example\nyarn\nyarn start\n```\n\n## Questions?🤔 \n\nHit me on [![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/007_dark_shadow)\n[![Medium](https://img.shields.io/badge/Medium-asifvora-brightgreen.svg)](https://medium.com/@asifvora)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-asifvora-blue.svg)](https://www.linkedin.com/in/asif-vora/) \n[![Instagram](https://img.shields.io/badge/Instagram-Asif%20Vora-green.svg)](https://www.instagram.com/007_dark_shadow/) \n\n\n## License\n\nCopyright (c) Asif Vora\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasifvora%2Frn-app-intro-screen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasifvora%2Frn-app-intro-screen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasifvora%2Frn-app-intro-screen/lists"}