Skip to content

Multi-Step Form with Progress Bar

Bootstrap 6 three-step signup form with a gradient progress bar, per-step validation, password Strength meter, radio cards, switches and a success screen.

Also known as: multi step form, multi step signup form, stepper form with progress bar, wizard form, step by step registration

Multi-Step Form with Progress Bar live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

A three-step signup form for Bootstrap 6 with a gradient progress bar, numbered step labels and validation that runs before each step can be left. It suits SaaS signups, trial requests and other long forms; the last screen confirms the account.

How it works

The root .msp-root carries a data-step attribute (1 to 4). CSS reads it to set the width of .msp-bar inside the Bootstrap 6 .progress element, so the first paint is already correct and the bar animates between 25%, 50%, 75% and 100%. The script keeps aria-valuenow, the .msp-count-step label and .msp-count-pct in sync, and moves aria-current="step" across the .msp-step list.

Each step is a <fieldset class="msp-panel"> with a data-msp-panel number; only the current one is visible. The Continue button is the form's submit button, so Enter also advances. On submit the script calls checkValidity() on every field of the current panel only. Invalid fields get .is-invalid and aria-invalid="true", the matching .invalid-feedback appears, and focus jumps to the first problem. Errors clear as soon as a field is fixed.

Step 1 uses the Bootstrap 6 Strength meter (data-bs-strength with four .strength-segment bars and a .strength-text label). Step 2 has a <select class="form-control"> and team-size radios built as .form-field-card tiles. Step 3 uses .switch toggles and a required .check for the terms. After the last step the button shows a .spinner-border while a timeout simulates the request, then the .msp-done panel receives focus. The .msp-restart button resets everything.

Customization

  • --msp-brand and --msp-brand-2 on .msp-root: change the gradient of the progress bar and success icon; --msp-brand also recolors buttons, radios, switches and focus rings through the overridden --bs-primary-* tokens.
  • --msp-bg, --msp-line and --msp-muted on .msp-root: adjust the page tint, dividers and secondary text.
  • TOTAL in script.js plus the .msp-root[data-step] width rules in style.css: add a fourth step by adding a panel, a .msp-step item and new widths.
  • minlength="8" on #msp-password: change the password rule; update #msp-password-error to match.
  • .msp-choices grid in style.css: switch the team-size tiles from four columns to two or three.
  • Replace the setTimeout in the submit handler with a fetch() POST of new FormData(form).

Use cases

  • Account registration: three steps split the signup into small parts with a progress bar
  • SaaS onboarding: each step is validated before the user can continue
  • Secure sign-ups: a password strength meter helps users choose a good password
  • Preference collection: radio cards and switches gather choices, then a success screen confirms

Accessibility

Every control has a visible label, and error messages are linked with aria-describedby. The step counter is an aria-live="polite" region, so screen readers hear "Step 2 of 3" when the step changes. The progress bar has role="progressbar" and an aria-label. Each step is a <fieldset> with a visually hidden <legend>. Focus moves to the first field of each new step and to the success message at the end. The bar animation respects prefers-reduced-motion.

Bootstrap 6 notes

Bootstrap 5's .form-check and .form-switch become a plain .check and a .switch wrapper inside .form-field. .form-select is gone, so selects use .form-control. btn-primary is now btn-solid theme-primary, and spinner-border-sm is spinner-sm. The Strength meter is new in Bootstrap 6 and needs no extra code. Built on Bootstrap 6.0.0-alpha.1, so APIs may still change.

Multi-Step Form with Progress Bar at a glance

Framework
Bootstrap 6
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 6
Layout
Responsive, works on mobile
Category
Multi-step Forms
License
Free for personal and commercial use

Questions about this template

Can I use the Multi-Step Form with Progress Bar code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 6 from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/css/bootstrap.min.css">
  • <script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js"></script>

Built for Bootstrap 6.0.0-alpha.1. Bootstrap 6 ships as an ES module, so its script and this component's JavaScript load with type="module". Alpha releases can still change before the stable version.

Multi-Step Form with Progress Bar – free Bootstrap 6 multi-step form template
Multi-Step Form with Progress Bar · free Bootstrap 6 multi-step form template

More Multi-step Forms

Multi-Step Form with Progress Bar – free Pure CSS multi-step form template

Multi-Step Form with Progress Bar

Four-step signup form with an animated progress bar, numbered step labels, per-step validation, Back and Next buttons and a review summary.

Multi-Step Registration Form – free Bootstrap 5 multi-step form template

Multi-Step Registration Form

Bootstrap 5 three-step registration form with a progress bar, step indicators, per-step validation, password matching, plan cards and a success screen.

Onboarding Wizard – free Tailwind CSS multi-step form template

Onboarding Wizard

Tailwind CSS onboarding wizard with step indicator, progress bar, radio cards, topic chips, validation and an editable summary before finishing.