0.1.0 • Published 2 years ago

customreactjsstepwizard v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

A step wizard built with React.

npm.io

code implementation

<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', minHeight: '100vh' }}>
    <div>
        <StepWizard onIndexChange={(index) => {
            if(index === 3) setNextDisabled(true); else setNextDisabled(false);
            if(index === 0) setPrevDisabled(true); else setPrevDisabled(false);
            }} animation={true} ref={wizardRef}>
            <div className="container">
                First Page
            </div>
            <div className="container">
                Second Page
            </div>
            <div className="container">
                Third Page
            </div>
            <div className="container">
                Fourth Page
            </div>
        </StepWizard>
        <div style={{ marginTop: '10px', textAlign: 'center' }}>
            <button disabled={prevDisabled} style={{ margin: '0 10px', display: 'inline-block' }} onClick={() => wizardRef.current?.previous()}>previous</button>
            <button disabled={nextDisabled} style={{ margin: '0 10px', display: 'inline-block' }} onClick={() => wizardRef.current?.next()}>next</button>
        </div>
    </div>
</div>

Component Props

PropsTypes
animation (optional)boolean
onIndexChange (optional)(value: number) => number

Note: The step-wizard does not provide any built in components i.e, Buttons, Forms Elements etc.

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.1.0

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.16

2 years ago

0.0.8

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago