Installations
npm install react-native-intro-slider
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
12.4.0
NPM Version
6.9.0
Score
71.5
Supply Chain
99.3
Quality
75.1
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (97.64%)
JavaScript (2.36%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
jacse
Download Statistics
Total Downloads
3,418
Last Day
1
Last Week
2
Last Month
18
Last Year
211
GitHub Statistics
MIT License
1,673 Stars
106 Commits
330 Forks
19 Watchers
2 Branches
20 Contributors
Updated on Feb 19, 2025
Package Meta Information
Latest Version
3.0.1
Package Id
react-native-intro-slider@3.0.1
Unpacked Size
26.61 kB
Size
7.04 kB
File Count
8
NPM Version
6.9.0
Node Version
12.4.0
Total Downloads
Cumulative downloads
Total Downloads
3,418
Last Day
0%
1
Compared to previous day
Last Week
-33.3%
2
Compared to previous week
Last Month
100%
18
Compared to previous month
Last Year
-21.3%
211
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads

No dependencies detected.
react-native-app-intro-slider
Easy-to-use yet very configurable app introduction slider/swiper based on FlatList
1npm i react-native-app-intro-slider --save
![]() | ![]() |
Table of contents
Usage
Basic example
No configuration | showSkipButton | bottomButton and showSkipButton |
---|---|---|
![]() | ![]() | ![]() |
The component is based on FlatList so usage is very similar. Pass a data-array to AppIntroSlider along with a renderItem-function (or you can use the default basic layout).
1import React from 'react'; 2import { StyleSheet } from 'react-native'; 3import AppIntroSlider from 'react-native-app-intro-slider'; 4 5const slides = [ 6 { 7 key: 'somethun', 8 title: 'Title 1', 9 text: 'Description.\nSay something cool', 10 image: require('./assets/1.jpg'), 11 backgroundColor: '#59b2ab', 12 }, 13 { 14 key: 'somethun-dos', 15 title: 'Title 2', 16 text: 'Other cool stuff', 17 image: require('./assets/2.jpg'), 18 backgroundColor: '#febe29', 19 }, 20 { 21 key: 'somethun1', 22 title: 'Rocket guy', 23 text: 'I\'m already out of descriptions\n\nLorem ipsum bla bla bla', 24 image: require('./assets/3.jpg'), 25 backgroundColor: '#22bcb5', 26 } 27]; 28 29export default class App extends React.Component { 30 this.state = { 31 showRealApp: false 32 } 33 _renderItem = (item) => { 34 return ( 35 <View style={styles.slide}> 36 <Text style={styles.title}>{item.title}</Text> 37 <Image source={item.image} /> 38 <Text style={style.text}>{item.text}</Text> 39 </View> 40 ); 41 } 42 _onDone = () => { 43 // User finished the introduction. Show real app through 44 // navigation or simply by controlling state 45 this.setState({ showRealApp: true }); 46 } 47 render() { 48 if (this.state.showRealApp) { 49 return <App />; 50 } else { 51 return <AppIntroSlider renderItem={this._renderItem} slides={slides} onDone={this._onDone}/>; 52 } 53 } 54}
Configuring buttons
1import React from 'react'; 2import { Ionicons } from '@expo/vector-icons'; 3import { StyleSheet, View } from 'react-native'; 4import AppIntroSlider from 'react-native-app-intro-slider'; 5 6const styles = StyleSheet.create({ 7 buttonCircle: { 8 width: 40, 9 height: 40, 10 backgroundColor: 'rgba(0, 0, 0, .2)', 11 borderRadius: 20, 12 justifyContent: 'center', 13 alignItems: 'center', 14 }, 15 image: { 16 width: 320, 17 height: 320, 18 }, 19}); 20 21// slides = [...] 22 23export default class App extends React.Component { 24 _renderNextButton = () => { 25 return ( 26 <View style={styles.buttonCircle}> 27 <Ionicons 28 name="md-arrow-round-forward" 29 color="rgba(255, 255, 255, .9)" 30 size={24} 31 style={{ backgroundColor: 'transparent' }} 32 /> 33 </View> 34 ); 35 }; 36 _renderDoneButton = () => { 37 return ( 38 <View style={styles.buttonCircle}> 39 <Ionicons 40 name="md-checkmark" 41 color="rgba(255, 255, 255, .9)" 42 size={24} 43 style={{ backgroundColor: 'transparent' }} 44 /> 45 </View> 46 ); 47 }; 48 render() { 49 return ( 50 <AppIntroSlider 51 slides={slides} 52 renderDoneButton={this._renderDoneButton} 53 renderNextButton={this._renderNextButton} 54 /> 55 ); 56 } 57}
Custom slide layout
1import React from 'react'; 2import { Ionicons } from '@expo/vector-icons'; 3import { StyleSheet, View, Text, Image } from 'react-native'; 4import { LinearGradient } from 'expo'; 5import AppIntroSlider from 'react-native-app-intro-slider'; 6 7const styles = StyleSheet.create({ 8 mainContent: { 9 flex: 1, 10 alignItems: 'center', 11 justifyContent: 'space-around', 12 }, 13 image: { 14 width: 320, 15 height: 320, 16 }, 17 text: { 18 color: 'rgba(255, 255, 255, 0.8)', 19 backgroundColor: 'transparent', 20 textAlign: 'center', 21 paddingHorizontal: 16, 22 }, 23 title: { 24 fontSize: 22, 25 color: 'white', 26 backgroundColor: 'transparent', 27 textAlign: 'center', 28 marginBottom: 16, 29 }, 30}); 31 32const slides = [ 33 { 34 key: 'somethun', 35 title: 'Quick setup, good defaults', 36 text: 37 'React-native-app-intro-slider is easy to setup with a small footprint and no dependencies. And it comes with good default layouts!', 38 icon: 'ios-images-outline', 39 colors: ['#63E2FF', '#B066FE'], 40 }, 41 { 42 key: 'somethun1', 43 title: 'Super customizable', 44 text: 45 'The component is also super customizable, so you can adapt it to cover your needs and wants.', 46 icon: 'ios-options-outline', 47 colors: ['#A3A1FF', '#3A3897'], 48 }, 49 { 50 key: 'somethun2', 51 title: 'No need to buy me beer', 52 text: 'Usage is all free', 53 icon: 'ios-beer-outline', 54 colors: ['#29ABE2', '#4F00BC'], 55 }, 56]; 57 58export default class App extends React.Component { 59 _renderItem = props => ( 60 <LinearGradient 61 style={[ 62 styles.mainContent, 63 { 64 width: props.width, 65 height: props.height, 66 }, 67 ]} 68 colors={props.colors} 69 start={{ x: 0, y: 0.1 }} 70 end={{ x: 0.1, y: 1 }} 71 > 72 <Ionicons 73 style={{ backgroundColor: 'transparent' }} 74 name={props.icon} 75 size={200} 76 color="white" 77 /> 78 <View> 79 <Text style={styles.title}>{props.title}</Text> 80 <Text style={styles.text}>{props.text}</Text> 81 </View> 82 </LinearGradient> 83 ); 84 85 render() { 86 return <AppIntroSlider slides={slides} renderItem={this._renderItem} bottomButton />; 87 } 88}
Here 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.
Props and options
The component extends FlatList
so all FlatList-props are valid.
Configure looks
Name | Type | Default | Description |
---|---|---|---|
skipLabel | string | Skip | Custom label for Skip button |
doneLabel | string | Done | Custom label for Done button |
nextLabel | string | Next | Custom label for Next button |
prevLabel | string | Back | Custom label for Prev button |
bottomButton | boolean | false | Enable to show a full-width button under pagination |
buttonStyle | style | null | Styling of outer button component |
buttonTextStyle | style | null | Styling of button text component |
dotStyle | style | {backgroundColor: 'rgba(0, 0, 0, .2)'} | Style of inactive pagination dots |
activeDotStyle | style | {backgroundColor: 'rgba(255, 255, 255, .9)'} | Style of active pagination dot |
paginationStyle | style | null | Styling of the pagination dots |
hidePagination | boolean | false | Enable to hide the pagination |
renderNextButton | function | renders a Text-component | Use to supply your own next button |
renderPrevButton | function | renders a Text-component | Use to supply your own prev button |
renderDoneButton | function | renders a Text-component | Use to supply your own done button |
renderSkipButton | function | renders a Text-component | Use to supply your own skip button |
renderItem | function | renders DefaultSlide | (FlatList's renderItem)[https://facebook.github.io/react-native/docs/flatlist.html#renderitem]. Receives {item, index, dimensions} where dimensions contains height and width of the slides. |
Configure behavior
Name | Type | Default | Description |
---|---|---|---|
slides | object | No default, required | An array of objects (they should either contain a unique key -prop or you should pass a keyExtractor -function to the component) |
showSkipButton | 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 |
showPrevButton | 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 |
showNextButton | boolean | true | Disable to hide the next button |
showDoneButton | boolean | true | Disable to hide the done button |
onSlideChange | function | void | Called when user goes changes slide (by swiping or pressing next/prev). Function called with arguments index: number, lastIndex: number |
onDone | function | void | Called when user ends the introduction by pressing the done button |
onSkip | function | Scroll the list to the end | Called when user presses the skip button |
Slide object
If you want to use the default slide layout, your slides can contain the following information:
Name | Type | Note |
---|---|---|
title | string | The title |
titleStyle | Style -prop | Styling for the title (e.g color, fontSize) |
text | string | Main text of slide |
textStyle | Style -prop | Styling for the text (e.g color, fontSize) |
image | Image -source prop | Slide image |
imageStyle | Style -prop | Styling for the image (e.g. size) |
backgroundColor | string | Slide background color |
Methods
Method Name | Arguments | Description |
---|---|---|
goToSlide | number | Change to slide with specified index |
getListRef | none | Returns the Flat List ref |
Example
You can run the example Expo-app by cloning the repo:
1git clone https://github.com/Jacse/react-native-app-intro-slider.git 2cd react-native-app-intro-slider/Example 3yarn 4yarn start

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 8/28 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 11 are checked with a SAST tool
Reason
54 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-f5x2-xv93-4p23
- Warn: Project is vulnerable to: GHSA-gmpm-xp43-f7g6
- Warn: Project is vulnerable to: GHSA-pf27-929j-9pmm
- Warn: Project is vulnerable to: GHSA-327c-qx3v-h673
- Warn: Project is vulnerable to: GHSA-x4cf-6jr3-3qvp
- Warn: Project is vulnerable to: GHSA-mph8-6787-r8hw
- Warn: Project is vulnerable to: GHSA-7mhc-prgv-r3q4
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-v8v8-6859-qxm4
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-4cpg-3vgw-4877
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-rxrc-rgv4-jpvx
- Warn: Project is vulnerable to: GHSA-7f53-fmmv-mfjv
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-gff7-g5r8-mg8m
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v
- Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx
- Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p
- Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv
- Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q
- Warn: Project is vulnerable to: GHSA-crh6-fp67-6883
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
2
/10
Last Scanned on 2025-02-17
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-native-intro-slider
react-native-app-intro-slider
Simple and configurable app introduction slider for react native
react-native-slider-intro
A simple and full customizable React Native package which implements a unique slider.
@unbogify/react-native-app-intro-slider
Simple and configurable app introduction slider for react native
@types/react-native-app-intro-slider
Stub TypeScript definitions entry for react-native-app-intro-slider, which provides its own types definitions