Socket
Socket
Sign inDemoInstall

react-native-js-stepper

Package Overview
Dependencies
81
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-js-stepper

React Native component to display a `Stepper`, a sequence of logical and numbered steps, frequently used for navigation.


Version published
Weekly downloads
6
increased by200%
Maintainers
1
Install size
4.33 MB
Created
Weekly downloads
 

Readme

Source

react-native-js-stepper

React Native component to display a Stepper, a sequence of logical and numbered steps, frequently used for navigation.

See more on:

https://material.io/guidelines/components/steppers.html

Stepper

Getting started

$ yarn add react-native-js-stepper

Usage

/* @flow */

import React from 'react'
import { StyleSheet } from 'react-native'
import Stepper from 'react-native-js-stepper'

type Props = {}

export default class ViewScreen extends React.Component<Props> {
  render() {
    return (
      <Stepper
        ref={(ref: any) => {
          this.stepper = ref
        }}
        validation={false}
        activeDotStyle={styles.activeDot}
        inactiveDotStyle={styles.inactiveDot}
        showTopStepper={true}
        showBottomStepper={true}
        steps={['Step 1', 'Step 2']}
        backButtonTitle="BACK"
        nextButtonTitle="NEXT"
        activeStepStyle={styles.activeStep}
        inactiveStepStyle={styles.inactiveStep}
        activeStepTitleStyle={styles.activeStepTitle}
        inactiveStepTitleStyle={styles.inactiveStepTitle}
        activeStepNumberStyle={styles.activeStepNumber}
        inactiveStepNumberStyle={styles.inactiveStepNumber}>
        <View />
        <View />
      </Stepper>
    )
  }
}

const styles = StyleSheet.create({
  activeDot: {
    backgroundColor: 'grey'
  },
  inactiveDot: {
    backgroundColor: '#ededed'
  },
  activeStep: {
    backgroundColor: 'grey'
  },
  inactiveStep: {
    backgroundColor: '#ededed'
  },
  activeStepTitle: {
    fontWeight: 'bold'
  },
  inactiveStepTitle: {
    fontWeight: 'normal'
  },
  activeStepNumber: {
    color: 'white'
  },
  inactiveStepNumber: {
    color: 'black'
  }
})

API

PropsTypeDescriptionRequired
initialPagenumberIndex of initial page that should be selectedNo
onPressNextFunctionFunction executed when Next button is pressed at the bottomNo
onPressBackFunctionFunction executed when Back button is pressed at the bottomNo
onScrollPageFunctionFunction executed when page is changed by scroll eventNo
textButtonStyleObjectText styles of the Back and Next buttons at the bottomNo
backButtonTitlestringTitle of the Back buttonNo
nextButtonTitlestringTitle of the Next buttonNo
topStepperStyleObjectStyles of the top stepperNo
showTopStepperbooleanIf true shows the top stepperNo
activeDotStyleObjectStyles object of active dot at the bottomNo
inactiveDotStyleObjectStyles object of inactive dot at the bottomNo
stepsArrayArray of strings that contains title of each step on the top stepperNo
stepsTitleStyleObjectStyles object for title of each step at topNo
showBottomStepperbooleanIf true shows bottom stepperNo
activeStepNumberStyleObjectStyles object of number on active stepNo
inactiveStepNumberStyleObjectStyles object of number on inactive stepNo
activeStepTitleStyleObjectStyles object of title on active stepNo
inactiveStepTitleStyleObjectStyles object of title on inactive stepNo
validationbooleanDisables validation (related to top stepper numbers)No

License

MIT License

Copyright (c) 2018 InterfaceKit

Author

Antonio Moreno Valls <amoreno at apsl.net>

Built with 💛 by APSL.

Keywords

FAQs

Last updated on 23 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc