Options in v7 are restructured into logical groups. Below is the mapping for common configuration changes from v6 to v7.
| v6 Option | v7 Option |
|---|
selected | initialStep |
autoAdjustHeight | behavior.autoHeight |
backButtonSupport | behavior.supportBrowserHistory |
enableUrlHash | behavior.useUrlHash |
transition.animation | transition.effect |
transition.prefixCss | transition.css.prefix |
toolbar.showNextButton | toolbar.buttons.showNext |
anchor.enableNavigation | navigation.enabled |
lang.next | localization.buttons.next |
disabledSteps | stepStates.disabled |
getContent | contentLoader |
$('#smartwizard').smartWizard({
initialStep: 0,
theme: 'arrows',
displayMode: 'auto', // NEW: 'auto' | 'dark' | 'light' | 'none'
behavior: {
autoHeight: true,
supportBrowserHistory: true,
useUrlHash: false,
},
transition: {
effect: 'css',
speed: 400,
easing: '',
css: {
prefix: 'animate__animated',
forward: { show: 'animate__fadeIn', hide: 'animate__fadeOut' },
backward: { show: 'animate__fadeIn', hide: 'animate__fadeOut' },
},
},
toolbar: {
position: 'bottom',
buttons: {
showNext: true,
showPrevious: true,
},
extraElements: '<button>Custom</button>',
},
navigation: {
enabled: true,
alwaysClickable: false,
completed: {
enabled: true,
completeAllPreviousSteps: true,
clearOnBack: false,
clickable: true,
},
},
keyboardNavigation: {
enabled: true,
keys: {
left: [37],
right: [39],
},
},
swipeNavigation: { // NEW
enabled: false,
threshold: 50,
},
localization: {
buttons: {
next: 'Next',
previous: 'Previous',
},
},
stepStates: {
disabled: [2],
error: [],
warning: [],
hidden: [],
completed: [],
},
contentLoader: null,
});