Stepper

Vue Stepper / Wizard component

Responsive stepper built with Bootstrap 5 and Vue 3. Form wizard, vertical stepper, multi step form validation, optional step, mobile stepper & more

Stepper is a component that displays content as a process with defined by user milestones. This is a great solution for a variety of registration forms, where you don't want to scare the user with lots of fields and questions.

In this documentation, you can find examples of form wizard, vertical stepper, horizontal stepper, multi step form, mobile stepper, validation & more.

Note: Read the API tab to find all available options and advanced customization


Basic example

Initialize stepper with MDBSteppercomponent

  • 1 step1
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
  • 2 step2
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
        
            
            <template>
              <MDBStepper>
                <MDBStepperStep active>
                  <MDBStepperHead icon="1">
                    Step 1
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
                      do eiusmod tempor incididunt ut labore et dolore magna
                      aliqua
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="2">
                    Step 2
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
                      do eiusmod tempor incididunt ut labore et dolore magna
                      aliqua
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="3">
                    Step 3
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
                      do eiusmod tempor incididunt ut labore et dolore magna
                      aliqua
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent } from "mdb-vue-ui-kit";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent
                }
              };
            </script>
          
        
    

Change steps using external elements

To go to the next or previous step, you can use the nextStep and previousStep methods. You can also choose a specific step using the changeStep method by entering the step index

  • 1 step1
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
  • 2 step2
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
        
            
            <template>
              <div class="w-100">
                <div class="mb-3">
                  <MDBBtn
                    id="prev-step"
                    color="primary"
                    @click="$refs.btnStepper.prevStep()"
                  >
                    prev
                  </MDBBtn>
                  <MDBBtn
                    id="step-1"
                    color="primary"
                    @click="$refs.btnStepper.changeStep(1)"
                  >
                    step1
                  </MDBBtn>
                  <MDBBtn
                    id="step-2"
                    color="primary"
                    @click="$refs.btnStepper.changeStep(2)"
                  >
                    step2
                  </MDBBtn>
                  <MDBBtn
                    id="step-3"
                    color="primary"
                    @click="$refs.btnStepper.changeStep(3)"
                  >
                    step3
                  </MDBBtn>
                  <MDBBtn
                    id="next-step"
                    color="primary"
                    @click="$refs.btnStepper.nextStep()"
                  >
                    next
                  </MDBBtn>
                </div>
                <div>
                  <MDBStepper ref="btnStepper">
                    <MDBStepperStep active>
                      <MDBStepperHead icon="1">
                        Step 1
                      </MDBStepperHead>
                      <MDBStepperContent>
                        <span>
                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                          sed do eiusmod tempor incididunt ut labore et dolore magna
                          aliqua
                        </span>
                      </MDBStepperContent>
                    </MDBStepperStep>
                    <MDBStepperStep>
                      <MDBStepperHead icon="2">
                        Step 2
                      </MDBStepperHead>
                      <MDBStepperContent>
                        <span>
                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                          sed do eiusmod tempor incididunt ut labore et dolore magna
                          aliqua
                        </span>
                      </MDBStepperContent>
                    </MDBStepperStep>
                    <MDBStepperStep>
                      <MDBStepperHead icon="3">
                        Step 3
                      </MDBStepperHead>
                      <MDBStepperContent>
                        <span>
                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                          sed do eiusmod tempor incididunt ut labore et dolore magna
                          aliqua
                        </span>
                      </MDBStepperContent>
                    </MDBStepperStep>
                  </MDBStepper>
                </div>
              </div>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent, MDBBtn } from "mdb-vue-ui-kit";
              import { ref } from "vue";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent,
                  MDBBtn
                },
                setup(){
                  const btnStepper = ref(null);
                  return {
                    btnStepper
                  }
                }
              };
            </script>
          
        
    

Linear stepper

If you want to use basic validation before proceeding to the next step you can set linear property

  • 1 step1
    invalid
  • 2 step2
    invalid
  • 3 step3
    invalid
        
            
            <template>
              <MDBStepper linear>
                <MDBStepperForm>
                  <MDBStepperStep active>
                    <MDBStepperHead icon="1">
                      Step 1
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput
                        label="Step 1"
                        v-model="stepperInput1"
                        invalidFeedback="Invalid"
                        required
                      />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead icon="2">
                      Step 2
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput
                        label="Step 2"
                        v-model="stepperInput2"
                        invalidFeedback="Invalid"
                        required
                      />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead icon="3">
                      Step 3
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput
                        label="Step 3"
                        v-model="stepperInput3"
                        invalidFeedback="Invalid"
                        required
                      />
                      <MDBBtn color="primary" type="submit">Submit</MDBBtn>
                    </MDBStepperContent>
                  </MDBStepperStep>
                </MDBStepperForm>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent, MDBStepperForm, MDBInput, MDBBtn } from "mdb-vue-ui-kit";
              import { ref } from "vue";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent,
                  MDBStepperForm,
                  MDBInput,
                  MDBBtn
                },
                setup(){
                  const stepperInput1 = ref("");
                  const stepperInput2 = ref("");
                  const stepperInput3 = ref("");
                  return {
                    stepperInput1,
                    stepperInput2,
                    stepperInput3
                  }
                }
              };
            </script>
          
        
    

No editable stepper

You can set noEditable property to prevent you from editing the completed step again

  • 1 step1
    invalid
  • 2 step2
    invalid
  • 3 step3
    invalid
        
            
            <template>
              <MDBStepper noEditable>
                <MDBStepperForm>
                  <MDBStepperStep active>
                    <MDBStepperHead icon="1">
                      Step 1
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput label="Step 1" v-model="stepperInput4" />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead icon="2">
                      Step 2
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput label="Step 2" v-model="stepperInput5" />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead icon="3">
                      Step 3
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput label="Step 3" v-model="stepperInput6" />
                    </MDBStepperContent>
                  </MDBStepperStep>
                </MDBStepperForm>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent, MDBStepperForm, MDBInput } from "mdb-vue-ui-kit";
              import { ref } from "vue";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent,
                  MDBStepperForm,
                  MDBInput
                },
                setup(){
                  const stepperInput4 = ref("");
                  const stepperInput5 = ref("");
                  const stepperInput6 = ref("");
                  return {
                    stepperInput4,
                    stepperInput5,
                    stepperInput6
                  }
                }
              };
            </script>
          
        
    

Vertical stepper

Set vertical property to use the vertical view

  • 1 step1
    Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
  • 2 step2
    Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
  • 3 step3
    Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
        
            
            <template>
              <MDBStepper vertical>
                <MDBStepperStep active>
                  <MDBStepperHead icon="1">
                    step1
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="2">
                    step2
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="3">
                    step3
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent } from "mdb-vue-ui-kit";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent
                }
              };
            </script>
          
        
    

Mobile stepper

Set mobile property to use mobile view

  • 1 step1
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
  • 2 step2
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
        
            
            <template>
              <MDBStepper mobile>
                <MDBStepperStep active>
                  <MDBStepperHead icon="1">
                    step1
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="2">
                    step2
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="3">
                    step3
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent } from "mdb-vue-ui-kit";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent
                }
              };
            </script>
          
        
    

Mobile stepper progress bar

If the stepper contains more than 4 steps, the progress bar will be displayed by default instead of dots. You can edit the step limit with the mobile mobileProgress properties

  • 1 step1
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
  • 2 step2
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
  • 3 step3
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
        
            
            <template>
              <MDBStepper mobile mobileProgress>
                <MDBStepperStep active>
                  <MDBStepperHead icon="1">
                    step1
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="2">
                    step2
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="3">
                    step3
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="4">
                    step4
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="5">
                    step5
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="6">
                    step6
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="7">
                    step7
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="8">
                    step8
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="9">
                    step9
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="10">
                    step10
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="11">
                    step11
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep active>
                  <MDBStepperHead icon="12">
                    step12
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent } from "mdb-vue-ui-kit";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent
                }
              };
            </script>
          
        
    

Optional step

You can mark a step as optional by adding optional to it

  • 1 step1
    Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
  • 2 step2
    Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
  • 3 step3
    Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
        
            
            <template>
              <MDBStepper>
                <MDBStepperStep active>
                  <MDBStepperHead icon="1">
                    step1
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="2" optional>
                    step2
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead icon="3">
                    step3
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <span>
                      Lorem ipsum dolor sit amet enim. Etiam ullamcorper.
                      Suspendisse a pellentesque dui, non felis. Maecenas malesuada
                      elit lectus felis, malesuada ultricies.
                    </span>
                  </MDBStepperContent>
                </MDBStepperStep>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent } from "mdb-vue-ui-kit";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent
                }
              };
            </script>
          
        
    

Custom icons

if you want to use an icon instead of a step number you can do it by placing it inside #icon slot

  • step1
    invalid
  • step2
    invalid
  • step3
    invalid
        
            
            <template>
              <MDBStepper>
                <MDBStepperForm>
                  <MDBStepperStep active>
                    <MDBStepperHead>
                      <template #icon>
                        <MDBIcon icon="user" />
                      </template>
                      Step 1
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput label="Step 1" v-model="stepperInput7" />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead>
                      <template #icon>
                        <MDBIcon icon="envelope" />
                      </template>
                      Step 2
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput label="Step 2" v-model="stepperInput8" />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead>
                      <template #icon>
                        <MDBSpinner size="sm"></MDBSpinner>
                      </template>
                      Step 3
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput label="Step 3" v-model="stepperInput9" />
                    </MDBStepperContent>
                  </MDBStepperStep>
                </MDBStepperForm>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent, MDBStepperForm, MDBInput, MDBIcon, MDBSpinner } from "mdb-vue-ui-kit";
              import { ref } from "vue";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent,
                  MDBStepperForm,
                  MDBInput,
                  MDBIcon,
                  MDBSpinner
                },
                setup(){
                  const stepperInput7 = ref("");
                  const stepperInput8 = ref("");
                  const stepperInput9 = ref("");
                  return {
                    stepperInput7,
                    stepperInput8,
                    stepperInput9
                  }
                }
              };
            </script>
          
        
    

Form wizard

An example of so-called "Form wizard" with multiple inputs on each step.

  • 1 step1
    invalid
    invalid
  • 2 step2
    invalid
    invalid
    invalid
    invalid
  • 3 step3
        
            
            <template>
              <div>
                <MDBStepper linear ref="formWizardRef">
                  <MDBStepperForm>
                    <MDBStepperStep active>
                      <MDBStepperHead icon="1">
                        Step 1
                      </MDBStepperHead>
                      <MDBStepperContent>
                        <MDBInput
                          label="First Name (required)"
                          v-model="stepperInput10"
                          invalidFeedback="Invalid"
                          required
                          wrapperClass="mb-4"
                        />
                        <MDBInput
                          label="Last Name (required)"
                          v-model="stepperInput11"
                          invalidFeedback="Invalid"
                          required
                          wrapperClass="mb-4"
                        />
                        <MDBInput
                          label="Nickname (optional)"
                          v-model="stepperInput12"
                          wrapperClass="mb-4"
                        />
                      </MDBStepperContent>
                    </MDBStepperStep>
                    <MDBStepperStep>
                      <MDBStepperHead icon="2">
                        Step 2
                      </MDBStepperHead>
                      <MDBStepperContent>
                        <MDBInput
                          label="Company Name (required)"
                          v-model="stepperInput13"
                          invalidFeedback="Invalid"
                          required
                          wrapperClass="mb-4"
                        />
                        <MDBInput
                          label="Address (required)"
                          v-model="stepperInput14"
                          invalidFeedback="Invalid"
                          required
                          wrapperClass="mb-4"
                        />
                        <MDBInput
                          label="Email (required)"
                          type="email"
                          v-model="stepperInput15"
                          invalidFeedback="Invalid"
                          required
                          wrapperClass="mb-4"
                        />
                        <MDBInput
                          label="Phone (optional)"
                          type="number"
                          v-model="stepperInput16"
                          wrapperClass="mb-4"
                        />
                      </MDBStepperContent>
                    </MDBStepperStep>
                    <MDBStepperStep>
                      <MDBStepperHead icon="3">
                        Step 3
                      </MDBStepperHead>
                      <MDBStepperContent>
                        <MDBTextarea
                          label="Additional information"
                          rows="4"
                          v-model="textarea1"
                          wrapperClass="mb-4"
                        />
                        <MDBCheckbox
                          label="Create an account?"
                          v-model="checkbox1"
                          wrapperClass="d-flex justify-content-center mb-4"
                        />
                        <MDBBtn color="success" block type="submit">
                          Place Order
                        </MDBBtn>
                      </MDBStepperContent>
                    </MDBStepperStep>
                  </MDBStepperForm>
                </MDBStepper>
                <div class="d-flex justify-content-center px-3">
                  <MDBBtn
                    color="primary"
                    class="w-100 me-2"
                    @click="$refs.formWizardRef.prevStep()"
                  >
                    Previous step
                  </MDBBtn>
                  <MDBBtn
                    color="primary"
                    class="w-100"
                    @click="$refs.formWizardRef.nextStep()"
                  >
                    Next step
                  </MDBBtn>
                </div>
              </div>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent, MDBStepperForm, MDBInput, MDBTextarea, MDBCheckbox, MDBBtn } from "mdb-vue-ui-kit";
              import { ref } from "vue";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent,
                  MDBStepperForm,
                  MDBInput,
                  MDBTextarea,
                  MDBCheckbox, MDBBtn
                },
                setup(){
                  const formWizardRef = ref(null);
                  const stepperInput10 = ref("");
                  const stepperInput11 = ref("");
                  const stepperInput12 = ref("");
                  const stepperInput13 = ref("");
                  const stepperInput14 = ref("");
                  const stepperInput15 = ref("");
                  const stepperInput16 = ref("");
                  const textarea1 = ref("");
                  const checkbox1 = ref(true);
                  return {
                    formWizardRef,
                    stepperInput10,
                    stepperInput11,
                    stepperInput12,
                    stepperInput13,
                    stepperInput14,
                    stepperInput15,
                    stepperInput16,
                    textarea1,
                    checkbox1
                  }
                }
              };
            </script>
          
        
    

Toggle to vertical or mobile on smaller screens

If you want to change the view from horizontal to vertical or mobile with smaller screens you can use the verticalBreakpoint and mobileBeakpoint properties specifying the number of pixels at which the stepper should change to vertical or mobile. You can resize the browser window to test it.

  • step1
    invalid
  • step2
    invalid
  • step3
    invalid
        
            
            <template>
              <MDBStepper :verticalBreakpoint="768" :mobileBreakpoint="400">
                <MDBStepperStep active>
                  <MDBStepperHead>
                    <template #icon>
                      <MDBIcon icon="user" />
                    </template>
                    Step 1
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <MDBInput label="Step 1" v-model="stepperInput17" />
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead>
                    <template #icon>
                      <MDBIcon icon="envelope" />
                    </template>
                    Step 2
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <MDBInput label="Step 2" v-model="stepperInput18" />
                  </MDBStepperContent>
                </MDBStepperStep>
                <MDBStepperStep>
                  <MDBStepperHead>
                    <template #icon>
                      <MDBSpinner size="sm"></MDBSpinner>
                    </template>
                    Step 3
                  </MDBStepperHead>
                  <MDBStepperContent>
                    <MDBInput label="Step 3" v-model="stepperInput19" />
                  </MDBStepperContent>
                </MDBStepperStep>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent, MDBInput, MDBIcon, MDBSpinner } from "mdb-vue-ui-kit";
              import { ref } from "vue";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent,
                  MDBInput,
                  MDBIcon,
                  MDBSpinner
                },
                setup(){
                  const stepperInput17 = ref("");
                  const stepperInput18 = ref("");
                  const stepperInput19 = ref("");
                  return {
                    stepperInput17,
                    stepperInput18,
                    stepperInput19
                  }
                }
              };
            </script>
          
        
    

Events

Stepper emits events after successful step validation, after failed step validation, and before changing to another step. Check the browser console and try to change the step to see the result.

  • 1 step1
    invalid
  • 2 step2
    invalid
  • 3 step3
    invalid
        
            
            <template>
              <MDBStepper
                linear
                @onInvalid="onInvalid"
                @onValid="onValid"
                @onChangeStep="onChangeStep"
              >
                <MDBStepperForm>
                  <MDBStepperStep active>
                    <MDBStepperHead icon="1">
                      Step 1
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput
                        label="Step 1"
                        v-model="stepperInput20"
                        invalidFeedback="Invalid"
                        required
                      />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead icon="2">
                      Step 2
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput
                        label="Step 2"
                        v-model="stepperInput21"
                        invalidFeedback="Invalid"
                        required
                      />
                    </MDBStepperContent>
                  </MDBStepperStep>
                  <MDBStepperStep>
                    <MDBStepperHead icon="3">
                      Step 3
                    </MDBStepperHead>
                    <MDBStepperContent>
                      <MDBInput
                        label="Step 3"
                        v-model="stepperInput22"
                        invalidFeedback="Invalid"
                        required
                      />
                    </MDBStepperContent>
                  </MDBStepperStep>
                </MDBStepperForm>
              </MDBStepper>
            </template>
          
        
    
        
            
            <script>
              import { MDBStepper, MDBStepperStep, MDBStepperHead, MDBStepperContent, MDBStepperForm, MDBInput } from "mdb-vue-ui-kit";
              import { ref } from "vue";
              export default {
                components: {
                  MDBStepper,
                  MDBStepperStep,
                  MDBStepperHead,
                  MDBStepperContent,
                  MDBStepperForm,
                  MDBInput
                },
                setup(){
                  const stepperInput20 = ref("");
                  const stepperInput21 = ref("");
                  const stepperInput22 = ref("");
                  const onInvalid = e => {
                    console.log(e);
                  };
                  const onValid = e => {
                    console.log(e);
                  };
                  const onChangeStep = e => {
                    console.log(e);
                  };
                  return {
                    stepperInput20,
                    stepperInput21,
                    stepperInput22,
                    onInvalid,
                    onValid,
                    onChangeStep
                  }
                }
              };
            </script>
          
        
    

If you want to support our friends from Tailwind Elements you can also check out the Tailwind stepper documentation.

Stepper - API


Import

        
            
          <script>
            import {
              MDBStepper,
              MDBStepperStep,
              MDBStepperHead,
              MDBStepperContent,
              MDBStepperForm
            } from 'mdb-vue-ui-kit';
          </script>
        
        
    

Properties

MDBStepper

Name Type Default Description
tag String 'ul' Defines tag of the MDBStepper element
activeStepIndex Number 1 Set initial active step
linear Boolean false Set true for linear stepper
vertical Boolean false Set true for vertical stepper
mobile Boolean false Set true for mobile stepper
mobileProgress Boolean false Set true to indicate progress of the stepper
noEditable Boolean false Set true to block editing of the completed step
verticalBreakpoint Number Set the resolution below which the stepper will switch to vertical mode
mobileBreakpoint Number Set the resolution below which the stepper will switch to mobile mode

MDBStepperStep

Name Type Default Description
tag String 'li' Defines tag of the MDBStepperStep element
optional Boolean false Sets stepper step element optional

MDBStepperHead

Name Type Default Description
tag String 'div' Defines tag of the MDBStepperHead element

MDBStepperContent

Name Type Default Description
tag String 'div' Defines tag of the MDBStepperContent element

MDBStepperForm

Name Type Default Description
tag String 'div' Defines tag of the MDBStepperForm element

Methods

Name Description Example
changeStep Switch to the step given as the parameter $refs.stepper.changeStep(index)
nextStep Switch to the next step $refs.stepper.nextStep()
previousStep Switch to the previous step $refs.stepper.previousStep()