Skip to content

Checkout Stepper

Bootstrap 5 four-step checkout with cart, shipping, payment and review steps, a progress bar, per-step validation, Back/Continue buttons and a live order summary.

Also known as: multi step checkout form, checkout wizard, step by step checkout, checkout progress steps

Checkout Stepper live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A Bootstrap 5 multi-step checkout with four steps (Cart, Shipping, Payment and Review), a numbered progress bar, Back and Continue buttons, per-step validation and a live order summary. Use it for online stores, booking flows or any form that is easier to complete in small pieces.

How it works

The root section.cs-checkout contains the ol.cs-steps progress indicator, the form.cs-form and an aside.cs-summary. Each step is a fieldset.cs-panel with a data-step number; only the current one is visible, the others carry the hidden attribute. The .cs-actions row holds .cs-btn-back and the submit button .cs-btn-next.

On DOMContentLoaded the script sets up every .cs-checkout on the page. Submitting the form validates only the visible fieldset with checkValidity(), adds Bootstrap's was-validated class to it and focuses the first invalid field. If the step is valid, show() reveals the next panel, marks earlier steps with is-done and the active one with is-current and aria-current="step", and changes the button text from the NEXT_LABELS array. Back simply returns to the previous panel; entered values are kept.

The .cs-qty inputs carry a data-price, and the selected delivery radio carries a data-cost. On every input and change event updateTotals() recalculates subtotal, shipping, tax and total in the summary. The Review step is filled from the earlier fields by fillReview(), showing only the last four card digits. The final step runs placeOrder(), which shows a spinner for 1.2 seconds and then reveals .cs-done with a random order number.

Customization

  • --cs-accent, --cs-accent-dark and --cs-accent-soft in .cs-checkout: change the green used by the buttons, completed steps and selected delivery option.
  • --cs-bg and --cs-line in .cs-checkout: set the cream background and the border and connector line color.
  • TAX_RATE at the top of script.js: change the tax percentage; update the "Tax (8%)" label to match.
  • NEXT_LABELS in script.js: rename the Continue button text for each step.
  • data-price on each .cs-qty and data-cost on each delivery radio: set prices; the summary updates automatically.
  • Add a step by adding a fieldset.cs-panel, an li.cs-step and a label in NEXT_LABELS, then set grid-template-columns in .cs-steps to the new count.
  • Replace the window.setTimeout in placeOrder() with a fetch() call to your order or payment API.

Use cases

  • Online stores: a four-step checkout moves shoppers through cart, shipping, payment and review
  • Booking flows: per-step validation stops users from continuing until the visible fields are correct
  • Long forms: a numbered progress bar and Back and Continue buttons break the form into small pieces
  • Order pages: a live order summary updates subtotal, shipping, tax and total as choices change

Accessibility

The progress list has an aria-label, and the active step has aria-current="step". Each fieldset has a legend, which receives focus when the step changes, and a visually hidden role="status" region announces "Step 2 of 4: Shipping". All inputs have labels, and invalid fields show Bootstrap invalid-feedback text. Delivery options are real radio buttons, so arrow keys work. While the order is processing, the button uses aria-disabled instead of disabled so focus is not lost. Transitions are removed under prefers-reduced-motion: reduce.

Usage notes

Requires the Bootstrap 5 bundle (added automatically) and Bootstrap Icons. This is a demo: never handle real card data without a PCI-compliant payment provider. For several instances on one page, give the inputs unique ids.

Checkout Stepper at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Steppers
License
Free for personal and commercial use

Questions about this template

Can I use the Checkout Stepper 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 5 and Bootstrap Icons 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@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Checkout Stepper – free Bootstrap 5 stepper template
Checkout Stepper · free Bootstrap 5 stepper template

More Steppers

Vertical Stepper with Descriptions – free Tailwind CSS stepper template

Vertical Stepper with Descriptions

Dark Tailwind CSS vertical stepper with completed, current and upcoming states, step descriptions, a progress bar and Back / Mark as complete controls.

Horizontal Progress Stepper – free Tailwind CSS stepper template

Horizontal Progress Stepper

Tailwind CSS horizontal stepper with numbered circles, animated connector lines, completed/current/upcoming states and Back/Continue controls.