Gathering detailed insights and metrics for react-native-multistep-ciapetro
Gathering detailed insights and metrics for react-native-multistep-ciapetro
Gathering detailed insights and metrics for react-native-multistep-ciapetro
Gathering detailed insights and metrics for react-native-multistep-ciapetro
A component for react native, which helps you to deal with multi-step form. with some animations!
npm install react-native-multistep-ciapetro
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
33 Commits
1 Branches
1 Contributors
Updated on Sep 01, 2020
Latest Version
1.0.8
Package Id
react-native-multistep-ciapetro@1.0.8
Unpacked Size
2.12 MB
Size
2.08 MB
File Count
5
NPM Version
6.14.6
Node Version
12.18.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
You can install this package with the following command:
yarn add react-native-animated-multistep
or
npm install react-native-animated-multistep
you can also see this example
1import AnimatedMultistep from "react-native-animated-multistep"; 2import StepOne from "./StepOne"; 3import StepTwo from "./StepTwo"; 4import StepThree from "./StepThree"; 5 6/* Define the steps */ 7 8import Step1 from "./steps/step1"; 9import Step2 from "./steps/step2"; 10import Step3 from "./steps/step3"; 11import Step4 from "./steps/step4"; 12 13const allSteps = [ 14 { name: "step 1", component: Step1 }, 15 { name: "step 2", component: Step2 }, 16 { name: "step 3", component: Step3 }, 17 { name: "step 4", component: Step4 } 18]; 19 20/* Define your class */ 21export default class App extends Component { 22 /* define the method to be called when you go on next step */ 23 24 onNext = () => { 25 console.log("Next"); 26 }; 27 28 /* define the method to be called when you go on back step */ 29 30 onBack = () => { 31 console.log("Back"); 32 }; 33 34 /* define the method to be called when the wizard is finished */ 35 36 finish = finalState => { 37 console.log(finalState); 38 }; 39 40 /* render MultiStep */ 41 render() { 42 return ( 43 <View style={{ flex: 1 }}> 44 <AnimatedMultistep 45 steps={allSteps} 46 onFinish={this.finish} 47 onBack={this.onBack} 48 onNext={this.onNext} 49 comeInOnNext="bounceInUp" 50 OutOnNext="bounceOutDown" 51 comeInOnBack="bounceInDown" 52 OutOnBack="bounceOutUp" 53 /> 54 </View> 55 ); 56 } 57}
1import React, { Component } from "react"; 2import { Image, View, TouchableOpacity, TextInput, Text } from "react-native"; 3 4import styles from "./styles"; 5 6class step1 extends Component { 7 constructor(props) { 8 super(props); 9 this.state = { 10 totalSteps: "", 11 currentStep: "" 12 }; 13 } 14 15 static getDerivedStateFromProps = props => { 16 const { getTotalSteps, getCurrentStep } = props; 17 return { 18 totalSteps: getTotalSteps(), 19 currentStep: getCurrentStep() 20 }; 21 }; 22 23 nextStep = () => { 24 const { next, saveState } = this.props; 25 // Save state for use in other steps 26 saveState({ name: "samad" }); 27 28 // Go to next step 29 next(); 30 }; 31 32 goBack() { 33 const { back } = this.props; 34 // Go to previous step 35 back(); 36 } 37 38 render() { 39 const { currentStep, totalSteps } = this.state; 40 return ( 41 <View style={[styles.container, styles.step1]}> 42 <View> 43 <Text 44 style={styles.currentStepText} 45 >{`Step ${currentStep} of ${totalSteps}`}</Text> 46 </View> 47 <TextInput 48 style={styles.input} 49 onChangeText={text => this.setState({ text })} 50 value={this.state.text} 51 placeholder={"First Name"} 52 placeholderTextColor="#fff" 53 /> 54 <TextInput 55 style={styles.input} 56 onChangeText={text => this.setState({ text })} 57 value={this.state.text} 58 placeholder={"Last Name"} 59 placeholderTextColor="#fff" 60 /> 61 <View style={styles.btnContainer}> 62 <TouchableOpacity onPress={this.nextStep} style={styles.btnStyle}> 63 <Image 64 source={require("../assets/icons/arrow.png")} 65 style={styles.btnImage} 66 resizeMode="cover" 67 /> 68 </TouchableOpacity> 69 </View> 70 </View> 71 ); 72 } 73} 74 75export default step1;
Use this method to save state
Use this method to get all the values saved with saveState so far. Retuns an object
Use this method to go to next step in the app.
Use this method to go to previos step in the app.
Use this method to get current step.
Use this method to get total steps.
Props | Type | Notes | Required |
---|---|---|---|
steps | Array | array containing steps | ✔️ |
onFinish | function | a function, which will run when all steps are finish | ❌ |
onNext | function | a function, which will run when you go on next step | ❌ |
onBack | function | a function, which will run when you go on back step | ❌ |
comeInOnNext | String | define you animation type when the component comes in on next, default is fadeInLeft | ❌ |
OutOnNext | String | define you animation type when the component goes out on next, default is fadeOutRight | ❌ |
comeInOnBack | String | define you animation type when the component comes in on back, default is fadeInRight | ❌ |
OutOnBack | String | define you animation type when the component goes out on next, default is fadeOutLeft | ❌ |
duration | number | define you animation duration duration | ❌ |
you can add more animation and set-up animations by your own, check react-native-animatable for aminations.
Method Name | Arguments | Notes |
---|---|---|
next() | none | use this method to jump on next step |
back() | none | use this method to go back on previous step |
saveState() | Object | use this method to save your state, in order to get in other steps |
getState() | none | use this method to get you saved state by saveState() method |
getCurrentStep() | none | use this method to get current step |
getTotalSteps() | none | use this method to get total steps |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More