All Projects β†’ RichardRNStudio β†’ react-native-slider-intro

RichardRNStudio / react-native-slider-intro

Licence: MIT license
A simple and fully customizable React Native component that implements an intro slider for your app

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
c
50402 projects - #5 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to react-native-slider-intro

react-carousel-minimal
React.js Responsive Minimal Carousel
Stars: ✭ 76 (-5%)
Mutual labels:  slider, react-component
React Native Onboarding Swiper
πŸ›³ Delightful onboarding for your React-Native app
Stars: ✭ 596 (+645%)
Mutual labels:  slider, intro
Sleek circular slider
Sleek circular slider for Flutter
Stars: ✭ 269 (+236.25%)
Mutual labels:  slider, customizable
React Scrollbars Custom
The best React custom scrollbars component
Stars: ✭ 576 (+620%)
Mutual labels:  react-component, customizable
React Marquee Slider
The marquee slider of your deepest dreams. Only for React.js β›Ί
Stars: ✭ 73 (-8.75%)
Mutual labels:  slider, react-component
range-slider
Customizable slider (range) component for JavaScript with no dependencies
Stars: ✭ 26 (-67.5%)
Mutual labels:  slider, customizable
React Compound Slider
◾️ React Compound Slider | A small React slider with no opinion on markup or styles
Stars: ✭ 553 (+591.25%)
Mutual labels:  slider, react-component
Flutter Intro Slider
Simple and configurable app introduction slider for Flutter
Stars: ✭ 461 (+476.25%)
Mutual labels:  slider, intro
React Splide
The Splide component for React.
Stars: ✭ 32 (-60%)
Mutual labels:  slider, react-component
React Grid Carousel
React responsive carousel component w/ grid layout
Stars: ✭ 29 (-63.75%)
Mutual labels:  slider, react-component
Recipes App React Native
Recipes App in React Native
Stars: ✭ 386 (+382.5%)
Mutual labels:  react-component, mobile-development
Xam.plugin.simpleappintro
Just a nice and simple AppIntro for your Xamarin Forms project
Stars: ✭ 139 (+73.75%)
Mutual labels:  slider, intro
react-super-treeview
πŸ‘ Finally, a React Treeview component which is customizable on every level
Stars: ✭ 98 (+22.5%)
Mutual labels:  react-component, customizable
react-simple-range
πŸ”‰ React slider component for inputting a numeric value within a range.
Stars: ✭ 20 (-75%)
Mutual labels:  slider, react-component
react-native-tab-bars
Fully customizable navigation tab bar for React Native
Stars: ✭ 16 (-80%)
Mutual labels:  customizable, mobile-development
React Slider
Accessible, CSS agnostic, slider component for React.
Stars: ✭ 627 (+683.75%)
Mutual labels:  slider, react-component
React Responsive Carousel
React.js Responsive Carousel (with Swipe)
Stars: ✭ 1,962 (+2352.5%)
Mutual labels:  slider, react-component
wui
Collection of GUI widgets for the web
Stars: ✭ 44 (-45%)
Mutual labels:  slider, customizable
Generation
⭐ A Private, Secure, End-to-End Encrypted Messaging app made in Flutter(With Firebase and SQLite) that helps you to connect with your connections without any Ads, promotion. No other third-party person, organization, or even Generation Team can't read your messages. πŸ’
Stars: ✭ 18 (-77.5%)
Mutual labels:  mobile-development
emoji-slider
A slider control with emojis
Stars: ✭ 40 (-50%)
Mutual labels:  slider

πŸ“² react-native-slider-intro

npm version build platform license

A simple and fully customizable React Native component that implements an intro slider for your app.

This package has been written for the PC Controller react-native application as a submodule.

Visit the PC Controller website

Installation

npm install react-native-slider-intro --save

Running the example project

cd example && npm run example

Usage

Basic example

basic-example

Make your own data array and pass it to SliderIntro.

import React from 'react';
import SliderIntro from 'react-native-slider-intro';

const slides = [
  {
    index: 1,
    title: 'First step',
    text: 'Simple description.',
    image: require('./images/step1.png'),
    backgroundColor: '#febe29',
  },
  {
    index: 2,
    title: 'Second step',
    text: 'Simple description for the second step.',
    image: require('./images/step2.png'),
    backgroundColor: '#febe29',
  },
  {
    index: 3,
    title: 'Third step',
    text: 'Try to make something beauty here.',
    image: require('./images/step3.png'),
    backgroundColor: '#febe29',
  },
  {
    index: 4,
    title: 'Fourth step',
    text: 'Here you can open a custom link.',
    link: 'https://pccontroller.rnstudio.hu',
    image: require('./images/step4.png'),
    backgroundColor: '#febe29',
  },
];

const BasicExample = () => {
  return <SliderIntro data={slides} />;
};

Custom buttons example

custom-buttons-example

import React from 'react';
import SliderIntro from 'react-native-slider-intro';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import {
  faArrowCircleRight,
  faCheckCircle,
  faTimesCircle,
} from '@fortawesome/free-solid-svg-icons';

const slides = [...];

const renderNextButton = () => {
  return (
    <FontAwesomeIcon icon={faArrowCircleRight} color={'white'} size={35} />
  );
};

const renderDoneButton = () => {
  return <FontAwesomeIcon icon={faCheckCircle} color={'white'} size={35} />;
};

const renderSkipButton = () => {
  return <FontAwesomeIcon icon={faTimesCircle} color={'white'} size={35} />;
};

const CustomButtonsExample = () => {
  return (
    <SliderIntro
      renderNextButton={renderNextButton}
      renderDoneButton={renderDoneButton}
      renderSkipButton={renderSkipButton}
      navContainerMaxSizePercent={0.3}
      data={slides}
    />
  );
};

Column buttons example

column-buttons-example

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import SliderIntro from 'react-native-slider-intro';

const slides = [...];

const renderNextButton = () => {
  return (
    <View style={styles.nextButton}>
      <Text style={styles.text}>Next</Text>
    </View>
  );
};

const renderDoneButton = () => {
  return (
    <View style={styles.nextButton}>
      <Text style={styles.text}>Done</Text>
    </View>
  );
};

const renderSkipButton = () => {
  return (
    <View>
      <Text style={styles.text}>Skip</Text>
    </View>
  );
};

const ColumnButtonsExample = () => {
  return (
    <SliderIntro
      renderNextButton={renderNextButton}
      renderDoneButton={renderDoneButton}
      renderSkipButton={renderSkipButton}
      navContainerMaxSizePercent={0.3}
      navigationBarHeight={150}
      columnButtonStyle={true}
      data={slides}
    />
  );
};

Props

Name Type Default value Description
data array none, required Array of objects, which represents your slider items. Each item should contain a unique key.
renderItem function Default item renderer
navigationBarBottom number 0 Custom value of dot navigation container bottom position
navigationBarHeight number 70 Height of dot navigation container
animateSlideSpeed number 15 Speed of slider animation
navContainerMaxSizePercent number 0.5 Percent value of navigation container's width
dotWidth number 12 The radius of the 'dot' circle of navigation
fixDotOpacity number 0.35 Each dots opacity which don't have animation
fixDotBackgroundColor string grey Each dots background which don't have an animation
animatedDotBackgroundColor string white Each dots background which have an animation
animateDotSpeed number 8 Speed of dot animation
animateDotBouncing number 2 The 'bounciness' value of all animations. (https://reactnative.dev/docs/animated#spring)
hasReactNavigation boolean false There is a trouble with backButton behaviour when you're using react-navigation. You should use useFocusEffect in this case for reach the expected behaviour. More info: https://reactnavigation.org/docs/custom-android-back-button-handling/#why-not-use-component-lifecycle-methods
useCustomBackHandlerEffect function none As I mentioned above, sometimes we should rewrite the basic backHandler behaviour. This property will be a custom hook. See the example for more info: React navigation custom hook example
backHandlerBehaviour string activeMinusOne This prop can controls the backButton behaviour. The value should be activeMinusOne or 'previous'
skipLabel string Skip Custom label of skip button
nextLabel string Next Custom label of next button
doneLabel string Done Custom label of done button
renderSkipButton function Default skip/previous button renderer Use to supply your own skip/previous button.
renderNextButton function Default next button renderer Use to supply your own next button.
renderDoneButton function Default done button renderer Use to supply your own done button.
onDone function none Behaviour of done button
onSkip function none Behaviour of skip button
showLeftButton boolean true Show skip or previous button on the left side
leftButtonType string skip The button type on the left side should be skip or previous
columnButtonStyle boolean false Buttons will show up in a column
showStatusBar boolean false Show status bar on top of screen. Otherwise, you can make your own status bar outside of this component
statusBarColor string #febe29 Background color of status bar
renderStatusBar function Default status bar renderer Use to supply your own status bar component.

Examples

Troubleshooting

TouchableOpacity onPress function: I've created a new issue on official react-native repository, because TouchableOpacity, Button and Pressable don't working inside PanResponder with react-navigation NavigationContainer. My solution: Import TouchableWithoutFeedback from react-native-gesture-handler instead of react-native and use onPressIn instead of onPress function then overwrite the renderItem function.

Contributing

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

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].