The Wizard component provides a step-by-step interface for guiding users through multi-step processes or forms. It features navigation buttons, progress tracking, and customizable styling options.
< div class = "page-content" > Page 1 Content </ div >
< div class = "page-content" > Page 2 Content </ div >
< div class = "page-content" > Page 3 Content </ div >
< div data-role = "wizard" class = "wizard-wide-sm" >
< div class = "page-content" > Page 1 Content </ div >
< div class = "page-content" > Page 2 Content </ div >
< div class = "page-content" > Page 3 Content </ div >
< div data-role = "wizard" data-button-mode = "square" data-button-outline = "false" >
< div class = "page-content" > Page 1 Content </ div >
< div class = "page-content" > Page 2 Content </ div >
Parameter Type Default Description startnumber 1The starting page index finishnumber 0The index of the finish page (0 means the last page) iconHelpstring 💡Icon for the help button iconPrevstring ←Icon for the previous button iconNextstring →Icon for the next button iconFinishstring ✔Icon for the finish button buttonModestring cycleButton style mode: cycle, square, or default buttonOutlineboolean trueWhether to use outline style for buttons durationnumber 300Animation duration in milliseconds clsWizardstring ""Additional CSS class for the wizard container clsActionsstring ""Additional CSS class for the actions bar clsHelpstring ""Additional CSS class for the help button clsPrevstring ""Additional CSS class for the previous button clsNextstring ""Additional CSS class for the next button clsFinishstring ""Additional CSS class for the finish button
next() - Navigate to the next page.
prev() - Navigate to the previous page.
first() - Navigate to the first page.
last() - Navigate to the last page.
toPage(pageIndex) - Navigate to a specific page by index.
destroy() - Remove the wizard component and clean up event handlers.
const wizard = Metro . getPlugin ( '#myWizard' , 'wizard' );
wizard . next (); // Go to next page
wizard . prev (); // Go to previous page
wizard . toPage ( 3 ); // Go to page 3
Event Description onPageTriggered when a page is displayed onNextPageTriggered when navigating to the next page onPrevPageTriggered when navigating to the previous page onFirstPageTriggered when navigating to the first page onLastPageTriggered when navigating to the last page onFinishPageTriggered when reaching the finish page onHelpClickTriggered when the help button is clicked onPrevClickTriggered when the previous button is clicked onNextClickTriggered when the next button is clicked onFinishClickTriggered when the finish button is clicked onBeforePrevTriggered before navigating to the previous page (return false to prevent navigation) onBeforeNextTriggered before navigating to the next page (return false to prevent navigation) onWizardCreateTriggered when the wizard component is created
data-on-next-page = "onNextPageHandler"
data-on-finish-click = "onFinishClickHandler" >
function onNextPageHandler ( event ) {
console . log ( 'Moving to page:' , event . detail . index );
function onFinishClickHandler ( event ) {
console . log ( 'Wizard completed!' );
// Process form data or navigate away
Variable Default (Light) Dark Mode Description --wizard-height200px200pxMinimum height of the wizard --wizard-background#ffffff#1e1f22Background color of the wizard --wizard-color#191919#dbdfe7Text color of the wizard --wizard-border-color#f3f3f3#484b4cBorder color of the wizard --wizard-number-color#a8a8a8#a8a8a8Color of the step numbers
--wizard-background : #f0f0f0 ;
--wizard-border-color : #cccccc ;
--wizard-number-color : #666666 ;
.wizard - The main container class (automatically added)
.page-content - Container for page content
.action-bar - Container for navigation buttons
.wizard-btn-help - Help button
.wizard-btn-prev - Previous button
.wizard-btn-next - Next button
.wizard-btn-finish - Finish button
.current - Applied to the current active section
.complete - Applied to completed sections
.wizard-wide-fs - Full-screen width
.wizard-wide-xs - Extra small width
.wizard-wide-sm - Small width
.wizard-wide-md - Medium width
.wizard-wide-lg - Large width
.wizard-wide-xl - Extra large width
.wizard-wide-xxl - Extra extra large width
.wizard-wide-xxxl - Extra extra extra large width