Stepper

React Bootstrap 5 Stepper / Wizard component

Responsive stepper built with Bootstrap 5. 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

You can automatically initialize the stepper component using MDBStepper.

  • 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
        
            
            import React from 'react';
            import { 
              MDBStepper, 
              MDBStepperStep,
            } from 'mdb-react-ui-kit';
            
            export default function App() {
              return (
                <MDBStepper>
                  <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
                    dolore magna aliqua
                  </MDBStepperStep>

                  <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                    consequat
                  </MDBStepperStep>

                  <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                  </MDBStepperStep>
                </MDBStepper>
              );
            }
          
        
    

Change steps using external elements

To go to the next or previous step, you can use the reference to the buttons.

  • 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
        
            
          import React, { useRef } from 'react';
          import { 
            MDBStepper, 
            MDBStepperStep,
            MDBBtn
          } from 'mdb-react-ui-kit';
          
          export default function App() {
            const prevRef = useRef(null);
            const nextRef = useRef(null);

            return (
              <div className='w-100'>
                <div className='mb-3'>
                  <MDBBtn ref={prevRef}>PREV</MDBBtn>
                  <MDBBtn ref={nextRef}>NEXT</MDBBtn>
                </div>
                <div>
                  <MDBStepper disableHeadSteps externalNext={nextRef} externalPrev={prevRef}>
                    <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
                      et dolore magna aliqua
                    </MDBStepperStep>
  
                    <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                      Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                      consequat
                    </MDBStepperStep>
  
                    <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                      Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
                      pariatur
                    </MDBStepperStep>
                  </MDBStepper>
                </div>
              </div>
            );
          }
        
        
    

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
        
            
          import React from 'react';
          import { 
            MDBStepper, 
            MDBStepperStep,
            MDBStepperForm,
            MDBInput,
            MDBValidationItem
          } from 'mdb-react-ui-kit';
          
          export default function App() {
            return (
              <MDBStepper
                linear
              >
                <MDBStepperForm>
                  <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                    <MDBValidationItem invalid feedback='invalid'>
                      <MDBInput label='step 1' required />
                    </MDBValidationItem>
                  </MDBStepperStep>

                  <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                    <MDBValidationItem invalid feedback='invalid'>
                      <MDBInput label='step 2' required />
                    </MDBValidationItem>
                  </MDBStepperStep>

                  <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                    <MDBValidationItem invalid feedback='invalid'>
                      <MDBInput wrapperClass='mb-4' label='step 3' required />
                      <MDBBtn type='submit'>submit</MDBBtn>
                    </MDBValidationItem>
                  </MDBStepperStep>
                </MDBStepperForm>
              </MDBStepper>
            );
          }
        
        
    

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
        
            
          import React, { useState } from 'react';
          import { 
            MDBStepper, 
            MDBStepperStep,
            MDBInput,
          } from 'mdb-react-ui-kit';
          
          export default function App() {
            return (
              <MDBStepper noEditable>
                <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                  <MDBInput label='step 1' />
                </MDBStepperStep>
  
                <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                  <MDBInput label='step 2' />
                </MDBStepperStep>
  
                <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                  <MDBInput label='step 3' />
                </MDBStepperStep>
              </MDBStepper>
            );
          }
        
        
    

Vertical stepper

Set type='vertical' 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 ultriciesUt 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.
        
            
          import React from 'react';
          import { 
            MDBStepper, 
            MDBStepperStep,
          } from 'mdb-react-ui-kit';
          
          export default function App() {
            return (
              <MDBStepper type='vertical'>
                <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et.
                  dolore magna aliqua
                </MDBStepperStep>
  
                <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.
                  consequat
                </MDBStepperStep>
  
                <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                </MDBStepperStep>
              </MDBStepper>
            );
          }
        
        
    

Mobile stepper

Set type='mobile' 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
        
            
          import React from 'react';
          import { 
            MDBStepper, 
            MDBStepperStep,
          } from 'mdb-react-ui-kit';
          
          export default function App() {
            return (
              <MDBStepper type='mobile'>
                <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
                  dolore magna aliqua
                </MDBStepperStep>
  
                <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                  consequat
                </MDBStepperStep>
  
                <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
              </MDBStepper>
            );
          }
        
        
    

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 mobileProgress property.

  • 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
        
            
          import React from 'react';
          import { 
            MDBStepper, 
            MDBStepperStep,
          } from 'mdb-react-ui-kit';
          
          export default function App() {
            return (
              <MDBStepper mobile mobileProgress>
                <MDBStepperStep itemId={1} icon='1' text='step1'>
                  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
                  dolore magna aliqua
                </MDBStepperStep>
  
                <MDBStepperStep itemId={2} icon='2' text='step2'>
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                  consequat
                </MDBStepperStep>
  
                <MDBStepperStep itemId={3} icon='3' text='step3'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
  
                <MDBStepperStep itemId={4} icon='4' text='step4'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
  
                <MDBStepperStep itemId={5} icon='5' text='step5'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
  
                <MDBStepperStep itemId={6} icon='6' text='step6'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
  
                <MDBStepperStep itemId={7} icon='7' text='step7'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
  
                <MDBStepperStep itemId={8} icon='8' text='step8'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
                <MDBStepperStep itemId={9} icon='9' text='step9'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
                <MDBStepperStep itemId={10} icon='10' text='step10'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
  
                <MDBStepperStep itemId={11} icon='11' text='step11'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
  
                <MDBStepperStep itemId={12} icon='12' text='step12'>
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
                </MDBStepperStep>
              </MDBStepper>
            );
          }
        
        
    

Custom icons

if you want to use an icon instead of a step number you can do it by setting MDBStepperHead icon property.

  • step1
    invalid
  • step2
    invalid
  • step3
    invalid
        
            
            import React, { useState } from 'react';
            import { 
              MDBStepper, 
              MDBStepperStep,
              MDBInput,
              MDBIcon,
              MDBSpinner
            } from 'mdb-react-ui-kit';
            
            export default function App() {
              return (
                <MDBStepper>
                  <MDBStepperStep headIcon={<MDBIcon fas icon='user' />} headText='step 1' itemId={1}>
                    <MDBInput label='step 1' />
                  </MDBStepperStep>
    
                  <MDBStepperStep headIcon={<MDBIcon fas icon='envelope' />} headText='step 2' itemId={2}>
                    <MDBInput label='step 2' />
                  </MDBStepperStep>
    
                  <MDBStepperStep headIcon={<MDBSpinner size='sm' />} headText='step 3' itemId={3}>
                    <MDBInput label='step 3' />
                  </MDBStepperStep>
                </MDBStepper>
              );
            }
          
        
    

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
        
            
            import React, { useState, useEffect, useRef } from 'react';
            import { 
              MDBStepper, 
              MDBStepperStep,
              MDBStepperForm,
              MDBInput,
              MDBCheckbox,
              MDBBtn,
              MDBValidationItem,
              MDBTextArea
            } from 'mdb-react-ui-kit';
            
            export default function App() {
              const wizardNextRef = useRef(null);
              const wizardPrevRef = useRef(null);
            
              const [wizardRefs, setWizardRefs] = useState<{
                prev: React.MutableRefObject<any> | null;
                next: React.MutableRefObject<any> | null;
              }>({ prev: null, next: null });

              useEffect(() => {
                setWizardRefs({ prev: wizardPrevRef, next: wizardNextRef });
              }, [wizardNextRef, wizardPrevRef]);

              return (
                <>
                  <MDBStepper externalNext={wizardRefs.next} externalPrev={wizardRefs.prev} linear>
                    <MDBStepperForm>
                      <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBInput
                            wrapperClass='mb-4'
                            label={
                              <>
                                First name <small className='text-muted'>(required)</small>
                              </>
                            }
                            required
                          />
                        </MDBValidationItem>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBInput
                            wrapperClass='mb-4'
                            label={
                              <>
                                Last name <small className='text-muted'>(required)</small>
                              </>
                            }
                            required
                          />
                        </MDBValidationItem>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBInput
                            wrapperClass='mb-4'
                            label={
                              <>
                                Nickname <small className='text-muted'>(required)</small>
                              </>
                            }
                            required
                          />
                        </MDBValidationItem>
                      </MDBStepperStep>
      
                      <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBInput
                            wrapperClass='mb-4'
                            label={
                              <>
                                Company name <small className='text-muted'>(required)</small>
                              </>
                            }
                            required
                          />
                        </MDBValidationItem>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBInput
                            wrapperClass='mb-4'
                            label={
                              <>
                                Address <small className='text-muted'>(required)</small>
                              </>
                            }
                            required
                          />
                        </MDBValidationItem>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBInput
                            wrapperClass='mb-4'
                            type='email'
                            label={
                              <>
                                Email <small className='text-muted'>(required)</small>
                              </>
                            }
                            required
                          />
                        </MDBValidationItem>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBInput
                            wrapperClass='mb-4'
                            type='number'
                            label={
                              <>
                                Phone <small className='text-muted'>(optional)</small>
                              </>
                            }
                          />
                        </MDBValidationItem>
                      </MDBStepperStep>
      
                      <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                        <MDBValidationItem invalid feedback='invalid'>
                          <MDBTextArea rows={4} wrapperClass='mb-4' label='Additional information' required />
                        </MDBValidationItem>
      
                        <MDBValidationItem feedback=''>
                          <MDBCheckbox
                            wrapperClass='d-flex justify-content-center mb-4'
                            label='Create an account?'
                            required
                          />
                        </MDBValidationItem>
      
                        <MDBBtn type='submit' block color='success' className='mb-4'>
                          Place order
                        </MDBBtn>
                      </MDBStepperStep>
                    </MDBStepperForm>
                  </MDBStepper>
                  <MDBBtn className='w-50' ref={wizardPrevRef}>
                    previous step
                  </MDBBtn>
                  <MDBBtn className='w-50' ref={wizardNextRef}>
                    next step
                  </MDBBtn>
                </>
              );
            }
          
        
    

Toggle to vertical or mobile on smaller screens

Change the stepper mode depending on window width.

  • step1
    invalid
  • step2
    invalid
  • step3
    invalid
        
            
            import React, { useState, useEffect, useCallback } from 'react';
            import { 
              MDBStepper, 
              MDBStepperStep,
              MDBInput,
              MDBIcon,
              MDBSpinner
            } from 'mdb-react-ui-kit';
            
            export default function App() {
              const [mode, setMode] = useState<'horizontal' | 'vertical' | 'mobile'>('horizontal');

              const handleResize = useCallback(() => {
                const width = window.innerWidth;
            
                if (width > 768) {
                  setMode('horizontal');
                } else if (width <= 768 && width > 400) {
                  setMode('vertical');
                } else {
                  setMode('mobile');
                }
              }, []);
            
              useEffect(() => {
                window.addEventListener('resize', handleResize);
            
                return () => {
                  window.removeEventListener('resize', handleResize);
                };
              }, [handleResize]);

              return (
                <MDBStepper type={mode}>
                  <MDBStepperStep headIcon={<MDBIcon fas icon='user' />} headText='step 1' itemId={1}>
                    <MDBInput label='step 1' />
                  </MDBStepperStep>
    
                  <MDBStepperStep headIcon={<MDBIcon fas icon='envelope' />} headText='step 2' itemId={2}>
                    <MDBInput label='step 2' />
                  </MDBStepperStep>
    
                  <MDBStepperStep headIcon={<MDBSpinner size='sm' />} headText='step 3' itemId={3}>
                    <MDBInput label='step 3' />
                  </MDBStepperStep>
                </MDBStepper>
              );
            }
          
        
    

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
        
            
            import React from 'react';
            import { 
              MDBStepper, 
              MDBStepperStep,
              MDBValidationItem,
              MDBInput,
              MDBStepperForm,
              MDBBtn
            } from 'mdb-react-ui-kit';
            
            export default function App() {
              return (
                <MDBStepper
                  onValid={(id) => console.log('onValid')}
                  onInvalid={(id) => console.log('onInvalid')}
                  onChange={(id) => console.log('onChangeStep')}
                  linear
                >
                  <MDBStepperForm>
                    <MDBStepperStep headIcon={1} headText='step 1' itemId={1}>
                      <MDBValidationItem invalid feedback='invalid'>
                        <MDBInput label='step 1' required />
                      </MDBValidationItem>
                    </MDBStepperStep>
    
                    <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                      <MDBValidationItem invalid feedback='invalid'>
                        <MDBInput label='step 2' required />
                      </MDBValidationItem>
                    </MDBStepperStep>
    
                    <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                      <MDBValidationItem invalid feedback='invalid'>
                        <MDBInput wrapperClass='mb-4' label='step 3' required />
                        <MDBBtn type='submit'>submit</MDBBtn>
                      </MDBValidationItem>
                    </MDBStepperStep>
                  </MDBStepperForm>
                </MDBStepper>
              );
            }
          
        
    

Add custom validation

You can use the customValidation method with MDBStepperStep component to use your own validation.

  • 1 step1
    Password should have 5 or more characters
  • 2 step2
    invalid
  • 3 step3
    invalid
        
            
            import React from 'react';
            import { 
              MDBStepper, 
              MDBStepperStep,
              MDBValidationItem,
              MDBBtn,
              MDBInput,
              MDBStepperForm
            } from 'mdb-react-ui-kit';
            
            export default function App() {
              return (
                <MDBStepper linear>
                  <MDBStepperForm>
                    <MDBStepperStep
                      customValidation={(input: HTMLInputElement) => {
                        const inputLenght = input.value.length;

                        if (inputLenght < 5) {
                          input.setCustomValidity('Invalid');
                        } else {
                          input.setCustomValidity('');
                        }

                        return inputLenght >= 5;
                      }}
                      headIcon={1}
                      headText='step 1'
                      itemId={1}
                    >
                      <MDBValidationItem invalid feedback='password must have 5 sings'>
                        <MDBInput type='password' label='step 1' required />
                      </MDBValidationItem>
                    </MDBStepperStep>

                    <MDBStepperStep headIcon={2} headText='step 2' itemId={2}>
                      <MDBValidationItem invalid feedback='invalid'>
                        <MDBInput label='step 2' required />
                      </MDBValidationItem>
                    </MDBStepperStep>

                    <MDBStepperStep headIcon={3} headText='step 3' itemId={3}>
                      <MDBValidationItem invalid feedback='invalid'>
                        <MDBInput wrapperClass='mb-4' label='step 3' required />
                        <MDBBtn type='submit'>submit</MDBBtn>
                      </MDBValidationItem>
                    </MDBStepperStep>
                  </MDBStepperForm>
                </MDBStepper>
              );
            }
          
        
    

Stepper - API


Import

        
            
        import { 
          MDBStepper,
          MDBStepperStep,
          MDBStepperForm,
        } from 'mdb-react-ui-kit';
      
        
    

Properties

MDBStepper

Name Type Default Description Example
className string '' Add custom classes to MDBStepper element. <MDBStepper className="class" />
defaultStep number 1 Change default step of the stepper. <MDBStepper defaultStep={3} />
disableHeadSteps boolean false Disable stepper head onClick change. <MDBStepper disableHeadSteps />
externalNext React.MutableRefObject null Reference to the external element, to change the stepper step to the next. <MDBStepper externalNext={nextRef} />
externalPrev React.MutableRefObject null Reference to the external element, to change the stepper step to the previous. <MDBStepper externalPrev={prevRef} />
linear boolean false Set to true to use the linear stepper <MDBStepper linear />
mobileOfLabel React.ReactNode 'of' Set custom of value in the mobile stepper head. <MDBStepper mobileOfLabel='at' />
mobileStepLabel React.ReactNode 'step' Set custom step value in the mobile stepper head. <MDBStepper mobileStepLabel='element' />
mobileBackLabel React.ReactNode 'BACK' Set custom text for BACK button. <MDBStepper mobileBackLabel='PREV' />
mobileNextLabel React.ReactNode 'NEXT' Set custom text for NEXT button. <MDBStepper mobileNextLabel='NXT' />
mobileProgress boolean false Enable mobile progress stepper. <MDBStepper type='mobile' mobileProgress />
noEditable boolean false Set to true to block editing of the completed step. <MDBStepper noEditable />
type 'horizontal' | 'vertical' | 'mobile' 'horizontal' Set the stepper view <MDBStepper type='vertical' />

MDBStepperStep

Name Type Default Description Example
className string '' Add custom classes to MDBStepperStep element. <MDBStepperStep className="class" />
contentClassName string '' Add custom classes to content element. <MDBStepperStep contentClassName="class" />
contentStyle React.CSSProperties - Add custom styles to content element. <MDBStepperStep contentStyle={customStyles} />
itemId number - Set the step unique id. <MDBStepperStep itemId={1} />
headClassName string '' Add custom classes to head element. <MDBStepperStep headClassName="class" />
headStyle React.CSSProperties - Add custom styles to head element. <MDBStepperStep headStyle={customStyles} />
headIcon React.ReactNode '0' Set step head icon. <MDBStepperStep headIcon='6' />
headText React.ReactNode 'none' Set step head text. <MDBStepperStep headText='step element' />

MDBStepperForm

For MDBStepperForm propeties check the MDBValidation properties.


Methods

MDBStepperStep

Name Type Description
customValidation (input: HTMLInputElement) => boolean Apply custom validation to the step.

Events

MDBStepper

Name Type Description
onChange (id: number) => void Event emitted before the step change.
onInvalid (id: number) => void Event emitted after unsuccessful step validation.
onValid (id: number) => void Event emitted after successful step validation.