A flexible wizard component for react and react-native
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
demo/src
src
tests
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
nwb.config.js
package-lock.json
package.json

README.md

@rahsheen/react-wizard

Travis npm package Coverage Status

@rahsheen/react-wizard is a flexible wizard component which can be used with react or react-native.

Making use of render props, @rahsheen/react-wizard allows you to control exactly how each step is rendered.

Example

<Wizard>
  <Wizard.Step>
    {({ nextStep, prevStep }) => {
      return (
        <div>
          <h2>This is Step 1</h2>
          <button onClick={nextStep}>Next</button>
        </div>
      );
    }}
  </Wizard.Step>
  <Wizard.Step>
    {({ submit, prevStep }) => (
      <div>
        <h2>This is Step 2</h2>
        <button onClick={prevStep}>Back</button>
        <button onClick={onSubmit}>Finish</button>
      </div>
    )}
  </Wizard.Step>
</Wizard>