Socket
Socket
Sign inDemoInstall

react-native-stepper-ui

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-stepper-ui

Stepper Component for React Native


Version published
Weekly downloads
200
decreased by-19.35%
Maintainers
1
Install size
12.0 kB
Created
Weekly downloads
 

Readme

Source

react-native-stepper-ui

Platform Version Download License

A simple and fully customizable React Native component to create stepper ui.

  • Work for android and IOS
  • Support typescript
  • Customizable

Table of contents

  1. Example
  2. Installation
  3. Usage
  4. Props

Example

Example OneExample TwoExample Three

Installation

If using yarn:

yarn add react-native-stepper-ui

If using npm:

npm i react-native-stepper-ui

Usage

import React, { useState } from "react";
import Stepper from "react-native-stepper-ui";
import { View, Alert, Text } from "react-native";
const MyComponent = (props) => {
  return (
    <View>
      <Text>{props.title}</Text>
    </View>
  );
};
const content = [
  <MyComponent title="Component 1" />,
  <MyComponent title="Component 2" />,
  <MyComponent title="Component 3" />,
];
const App = () => {
  const [active, setActive] = useState(0);
  return (
    <View style={{ marginVertical: 80, marginHorizontal: 20 }}>
      <Stepper
        active={active}
        content={content}
        onNext={() => setActive((p) => p + 1)}
        onBack={() => setActive((p) => p - 1)}
        onFinish={() => Alert.alert("Finish")}
      />
    </View>
  );
};

export default App;

Props

NameTypeDescriptionDefault
activenumberindex stepper activeundefined
contentReactElement[]Component that render to stepperundefined
onNextFunctionFunction called when the next step button is pressedundefined
onBackFunctionFunction called when the back step button is pressedundefined
onFinishFunctionFunction called when the finish step button is pressedundefined
wrapperStyle?ViewStyleWrapper component style{}
stepStyle?ViewStyleStep component style{backgroundColor: '#1976d2', width: 30, height: 30, borderRadius: 30, justifyContent: 'center', alignItems: 'center', opacity: 1}
stepTextStyle?TextStyleStep Text component style{color: 'white'}
buttonStyle?ViewStyleButton component style{ padding: 10, borderRadius: 4, alignSelf: 'flex-start', marginRight: 10, backgroundColor: '#a1a1a1'}
buttonTextStyle?TextStyleButton Text component style{color: 'white'}
showButton?booleanshow buttontrue

Keywords

FAQs

Last updated on 06 Jul 2020

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