@cypherlab/react-stepbar
Stepbar component for tunnel like ux's.
Install
npm i @cypherlab/react-stepbar
Usage
See Live demo
See Code example
import StepBar from '@cypherlab/react-stepbar'
const props = {
steps: ['Cart', 'Shipping', 'Recap', 'Payment']
, theme: 'dark'
, onRef: ref => (window['myStepBar'] = ref)
}
// render
<StepBar {...props} />
// ref usage
window['myStepBar'].setStep(3)
Table options
option | info |
---|---|
steps | steps data. array of anything. required |
onRef | |
onStep | |
theme | predefined theme |
Methods
option | info |
---|---|
setStep |
Test
You can play with the component in the browser via the index.html
.
(yarn|npm) run dev