react-native-simple-slides
v1.0.3
Published
A react native onboarding slides component
Downloads
2
Readme
React Native Simple Slides
Description
react-native-simple-slides is a dropin solution for onboarding slides or whatever use you find for it! Link to npm
installation
npm install react-native-simple-slides
Documentation
import React from 'react'
import { View } from 'react-native'
import { Slider } from 'react-native-simple-slides'
const slideData = [{
{
title: 'Woohoo!',
body: 'Thank you for downloading \n react-native-simple-slides!',
img: require('../assets/adventure.png'),
},
{
title: 'Check us out on github!',
body: 'Any contributions or feedback \nto this project is appriciated',
img: require('../assets/teamwork.png'),
buttonTitle: 'Get Started'
}
}]
const App = () => {
return <Slider data={slideData}/>
}
Props
Props | Required | type | ------|----------|------| data | no | Array header | no | String indicatorColor | no | String onExit | yes | Function
data
an Array of objects the item containing > buttonTitle will contain a button that triggers the onExit passed to Slider when pressed.
Props | Required | type | ------|----------|------| title | yes | String body | yes | String img | yes | String buttonTitle | no | String
header
if a header is provider it will show the header string at the top of the view.
indicatorColor
determines the color of the slide indicator.
onExit
will run when button is pressed. any item containing the > buttonTitle prop will render a button.
Any feedback is appriciated!
This is my first contribution to open source & I plan on mantaining / improving this library.
current roadmap
- [ ] Implement Test