0.1.1 • Published 29 days ago

react-native-tour-carousel v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
29 days ago

react-native-tour-carousel

Tour Carousel for use in react native app tours

Why

This package aims to enhance user experience through intuitive app tours, effectively showcasing key features, reducing learning curves, and boosting engagement. Its user-friendly design ensures easy integration, offering developers a hassle-free solution for creating immersive onboarding experience for free.

What

The Tour Carousel Component is a versatile component layer that combines the functionality of two popular React Native carousel libraries, react-native-reanimated-carousel and react-native-animated-dots-carousel. This component provides a cohesive and customizable way for users to navigate through a series of screens or slides.

Features

  • Smooth Animation: Utilizes the power of react-native-reanimated for smooth and performant animations.
  • Animated Dots Indicator: Includes a built-in dots indicator powered by react-native-animated-dots-carousel for easy navigation feedback.
  • Customizable: Easily customize the carousel behavior, animation settings, and dot styles to match your app's design.
  • Callback Functions: Supports callback functions for handling actions when the user completes or skips the carousel.

Preview

Installation

yarn add react-native-tour-carousel

package dependancies

yarn add react-native-reanimated react-native-gesture-handler react-native-reanimated-carousel react-native-animated-dots-carousel

Npm links

Quick usage guide

    const data = [{
        "illustration": "https://images.unsplash.com/photo-1601379329542-31c59347e2b8?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
        "subtitle": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Accumsan sit amet nulla facilisi morbi tempus iaculis urna id.",
        "title": "Lorem ipsum dolor sit amet"
    }]

    <TourCarousel data={data}/>

Prop Types

TourCarouselType

PropertyType
dataslide[]
viewedCountnumber
handleBottomButtonPress(arg0: boolean) => void
handleSkipButtonPress() => void
skipButtonConfigSkipButtonConfig
carouselConfigCarouselConfig
PaginationConfigPaginationConfig
buttonConfigButtonConfig

slide

PropertyType
illustrationstring
subtitlestring
titlestring

SlideConfig

PropertyType
slideInnerContainerStyleProp
slideImageContainerStyleProp
slideTextContainerStyleProp
slideTitlestring
slideSubtitlestring
maxNumberOfLinesnumber

SkipButtonConfig

PropertyType
skipButtonStyleStyleProp
skipButtonContainerStyleProp
titleStylestring
titlestring
disabledboolean
skipButtonTestIDstring
maxSkipCountnumber
skipableboolean

ButtonConfig

PropertyType
buttonTestIDstring
nextButtonTextstring
finishButtonTextstring
bottomButtonContainerStyleProp
bottomButtonTextStyleStyleProp

CarouselConfig

PropertyType
containerStyleProp
styleStyleProp
loopboolean
pagingEnabledboolean
snapEnabledboolean
autoPlayIntervalnumber
scrollAnimationDurationnumber
autoPlayboolean
verticalboolean
heightnumber
slideConfigSlideConfig

PaginationConfig

PropertyType
showDotsboolean
indexnumber
lengthnumber
activeIndicatorConfigDotConfig
inactiveIndicatorConfigDotConfig
decreasingDotsDecreasingDot[]
paginationContainerStyleDotConfig[]
dotColorStyleProp
dotStyleStyleProp
maxIndicatorsnumber

DecreasingDot (from react-native-animated-dots-carousel)

PropertyType
quantitynumber
configDotConfig

DotConfig (from react-native-animated-dots-carousel)

PropertyType
sizenumber
opacitynumber
colorstring
marginnumber
borderWidth?number
borderColor?string

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with create-react-native-library