logo The World’s #1 Bootstrap 4 HTML, Angular 9, React, VueJS & Laravel
Admin Dashboard Theme

Wizard

Overview

KTWizard is a Metronic's custom plugin defined in [metronic]/theme/html/[demo]/src/js/components/base/wizard.js.

Initialization

First parameter is the id, class, or tag of the HTML element. The second parameter is for the options.

wizard = new KTWizard('kt_wizard_v1', {
	startStep: 1, // initial active step number
	clickableSteps: true,  // allow step clicking
});

Options

var options = {
    startStep: 1,
    clickableSteps: true
};
Field Type Description
startStep number

The page number of step to start at the initial load

Sample
startStep: 1
clickableSteps boolean

Enable/disable manually clicking step titles

Sample
clickableSteps: true

Attributes

Atrribute Description
data-ktwizard-state

Set the initial KTWizard initial state. The state value will be changed based on interaction to the wizard.

Name Description
current

Current wizard step

done

All the previous wizard page step

pending

All the next wizard page step

data-ktwizard-type

Name Description
step

Define element as a step number button

step-info

Define element as a step info

step-content

Define element as a step content

action-submit

Define element as action submit button

action-next

Define element as action button to the next step

action-prev

Define element as action button to the previous step

action-last

Define element as action button to the last step

action-first

Define element as action button to the first step

API Methods

Method Description
setDefaults(options)

Set default options

goNext(eventHandle)

Go to the next step

goPrev(eventHandle)

Go to the prev step

goLast(eventHandle)

Go to the last step

goFirst(eventHandle)

Go to the first step

goTo(number, eventHandle)

Go to a step

stop()

Cancel step

start()

Resume step

getStep()

Get current step number

isLastStep()

Check last step

isFirstStep()

Check first step

on(name, handler)

Attach event

one(name, handler)

Attach event that will be fired once