Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

loverajoel/react-multistep-component

Repository files navigation

React Multistep Component

react-multistep-component is a multistep/wizard component for React

Installation

Using npm

npm install react-multistep-component

Examples(jsBin)

Usage

it's the container and wrapper for your steps. * * `currentStep` is the selected step when first render. By default the first (1) step will * be selected. *optional * * `stepShouldChange` is called whenever a step is changed. This method can be used for * validations. By default will return `true`. *optional * * `onStepChange` is called after step change (include the first time when render) and have * the current step how attribute * * `prevButton`/`nextButton` is a wrapper for the buttons, `html`, `jsx` or `string` can be included. * ex: `prevButton={Step 1}`. *optional * * `mountOnlySiblings` if it's set `true`, only the siblings of the currently active step will be * render. This is an improvement for big implementations. * */ } { /* * it's the wrapper for your step content. All content inside this will be tranclude. * * `customNavigator` `html`, `jsx` or `string` that will be used as a label of the step. *optional * */ } Example Step 1 Hello step 1
Javascript Rocks!
">import { Steps, Step } from 'react-multistep-component';

{
/*
* it's the container and wrapper for your steps.
*
* `currentStep` is the selected step when first render. By default the first (1) step will
* be selected. *optional
*
* `stepShouldChange` is called whenever a step is changed. This method can be used for
* validations. By default will return `true`. *optional
*
* `onStepChange` is called after step change (include the first time when render) and have
* the current step how attribute
*
* `prevButton`/`nextButton` is a wrapper for the buttons, `html`, `jsx` or `string` can be included.
* ex: `prevButton={Step 1}`. *optional
*
* `mountOnlySiblings` if it's set `true`, only the siblings of the currently active step will be
* render. This is an improvement for big implementations.
*
*/
}
<Steps currentStep={2}>
{
/*
* it's the wrapper for your step content. All content inside this will be tranclude.
*
* `customNavigator` `html`, `jsx` or `string` that will be used as a label of the step. *optional
*
*/
}
<Step>
Example Step 1
<span>Hello step 1span>
<Step/>
<Step>
<div>
Javascript Rocks!
div>
<Step/>
Steps>

Styles

By default the component doesn't contain styles, but there are a couple of themes that you can use in the examples

Todo

  • Add redux example
  • Add key events
  • Add more examples

Licence

MIT

About

React multistep component

Resources

Readme

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors