0.0.9 • Published 3 years ago

multistep.js v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

MultiStep

MultiStep is a multi-step wizard plugin

Installation

For node projects

npm i multistep.js or yarn add multistep.js

Using unpkg

https://unpkg.com/multistep.js@latest/dist/multistep.min.js

Usage

const multiStep = MultiStep(targetElement, { multiStepOptions });
const step1 = multiStep.addStep();
step1.setContent(htmlContent);

API

static MultiStep.get(element: HTMLElement):

Static method that gets MultiStep object for already bound element

MultiStep.addStep():

Add step in the wizard and returns the step object

MultiStep.getStep(stepNumber: number):

Returns the step object of given step number

MultiStep.updateOptions(newOptions: MultiStepOptions):

Updates the multiStep options

MultiStep.reset:

Reset step progress

Step.setContent:

Sets HTML content for a step object

Step.getStepNumber:

Gets step number. Step number starts from 1.

Options

onComplete():

Callback to notify when steps are completed

onNext(step: Step):

Callback to notify when next step is triggered. Provides step object as parameter

onPrev(step: Step):

Callback to notify when previous step is triggered. Provides step object as parameter

nextLabel:

Label for next button. Default is 'Next'

prevLabel:

Label for previous button. Default is 'Previous'

completeLabel:

Label for complete button. Default is 'Finish'

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago