1.0.3 • Published 6 years ago

react-native-simple-slides v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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

PropsRequiredtype
datanoArray
headernoString
indicatorColornoString
onExityesFunction

data

an Array of objects the item containing > buttonTitle will contain a button that triggers the onExit passed to Slider when pressed.

PropsRequiredtype
titleyesString
bodyyesString
imgyesString
buttonTitlenoString

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